NAME
Authen::Credential::plain - abstraction of a "plain" credential
DESCRIPTION
This helper module for Authen::Credential implements a "plain" credential, that is a pair of name and clear text password.
It supports the following attributes:
- name
-
the (usually user) name
- pass
-
the associated (clear text) password
It supports the following targets for the prepare() method:
- HTTP.Basic
-
HTTP Basic authentication, it returns a string that can be used for the
WWW-Authenticate
header
EXAMPLE
use Authen::Credential;
use HTTP::Request;
# get the credential from somewhere
$cred = Authen::Credential->parse(...);
# use the prepare() method to get ready-to-use data
$req = HTTP::Request->new(GET => $url);
$req->header(Authorization => $cred->prepare("HTTP.Basic"));
SEE ALSO
Authen::Credential, http://en.wikipedia.org/wiki/Basic_access_authentication.
AUTHOR
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2011-2015