1Authen::Credential::plaUisne(r3)Contributed Perl DocumenAtuatthieonn::Credential::plain(3)
2
3
4

NAME

6       Authen::Credential::plain - abstraction of a "plain" credential
7

DESCRIPTION

9       This helper module for Authen::Credential implements a "plain"
10       credential, that is a pair of name and clear text password.
11
12       It supports the following attributes:
13
14       name
15           the (usually user) name
16
17       pass
18           the associated (clear text) password
19
20       It supports the following targets for the prepare() method:
21
22       HTTP.Basic
23           HTTP Basic authentication, it returns a string that can be used for
24           the "WWW-Authenticate" header
25

EXAMPLE

27         use Authen::Credential;
28         use HTTP::Request;
29
30         # get the credential from somewhere
31         $cred = Authen::Credential->parse(...);
32
33         # use the prepare() method to get ready-to-use data
34         $req = HTTP::Request->new(GET => $url);
35         $req->header(Authorization => $cred->prepare("HTTP.Basic"));
36

SEE ALSO

38       Authen::Credential,
39       <http://en.wikipedia.org/wiki/Basic_access_authentication>.
40

AUTHOR

42       Lionel Cons <http://cern.ch/lionel.cons>
43
44       Copyright (C) CERN 2011-2015
45
46
47
48perl v5.38.0                      2023-07-20      Authen::Credential::plain(3)
Impressum