1Authen::Credential::plaUisne(r3)Contributed Perl DocumenAtuatthieonn::Credential::plain(3)
2
3
4
6 Authen::Credential::plain - abstraction of a "plain" credential
7
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
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
38 Authen::Credential,
39 <http://en.wikipedia.org/wiki/Basic_access_authentication>.
40
42 Lionel Cons <http://cern.ch/lionel.cons>
43
44 Copyright (C) CERN 2011-2015
45
46
47
48perl v5.30.1 2020-01-29 Authen::Credential::plain(3)