NAME

credsman - is a simple Pel extension to work with 'Windows Credential Manager'.

SYNOPSIS

    use strict;
    use warnings;
    use credsman qw(login);

    # This type of function is necessary to run login, 
    # You need to handle the access or conenction and Error messages

    sub Connect_Example {
        my $credentials = shift;
        # Here your code to login or connect using user and password
        if( $credentials->{user} eq 'pepe' and  $credentials->{password} eq 'pepepass' ){
            print "The Target Name is: $credentials->{target}\n";
            print "  User  : $credentials->{user}\n";
            print "  Pass  : $credentials->{password}\n";
            print "Attempt : $credentials->{attempt} of $credentials->{limit}\n"; 
            # Return 0 - Success
            return 0;
        }
        else{
            print "Fail\n";
            # Return to fail
            return 1;
        }
    }
   
    # In this Example the program will die at the attempt number 10.

    die "No Zero Return" if login( 
        program  => 'credsman',          # The Prefix to Store the credentials in wcm 
        target   => "Test",              # The Target to validate user and password, usually a server
        subref   => \&Connect_Example,   # Reference to a Function (how to validate password)
        limit    => 10,                  # Number of Attemps before the program Finish
    );

DESCRIPTION

Credsman (credential manager)

A small library that interacts with Perl and Windows Credential Manager.

It incorporates Windows Credential GUI. It also uses and is integrated with the status.

The Credentials will be stored with the Following format

    - Windows Credential Manager - Generic Credentials
    - format:
    - *['program name']~['Server name or Addres']*

EXPORT

login: Function GuiCred: Windows GUI User and Password Login.

AUTHOR

RODAGU , <rodagu@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2020 by Rodrigo Agurto

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.30.0 or, at your option, any later version of Perl 5 you may have available.