WebAuth::Token(3pm) | User Contributed Perl Documentation | WebAuth::Token(3pm) |
WebAuth::Token - Generic WebAuth token handling
use WebAuth; my $wa = WebAuth->new; eval { $token = WebAuth->token_decode ($wa, $data, $keyring); print ref ($token), " received\n"; print "Encoded: ", $token->encode, "\n"; }; if ($@) { # handle exception }
WebAuth::Token is the parent class for all WebAuth token objects. Other than when creating a new token by decoding an encrypted token, this class will never be used directly. Instead, it is the base class for all other WebAuth::Token::* classes, each of which represents a specific type of protocol token.
The following token classes are currently supported:
This token has two forms. The first is sent by the WAS to the WebKDC via a redirect to request either an id or a proxy token for the user, depending on whether the WAS will need credentials. The second is sent to the WebKDC as part of a request for a service token and contains only the command and creation time.
Each of these tokens have different data elements and therefore different accessor functions, and each has its own separate documentation. See that individual documentation for the available operations on each type of token.
As with WebAuth module functions, failures are signaled by throwing WebAuth::Exception rather than by return status.
Callers will normally want to check via isa() whether the returned token is of the type that the caller expected. Not performing that check can lead to security issues.
This is a convenience wrapper around the WebAuth token_decode() method.
The subclasses of WebAuth::Token also have a traditional new() constructor to create a new, empty token of that type.
Russ Allbery <eagle@eyrie.org>
WebAuth(3), WebAuth::Keyring(3), WebAuth::Token::App(3), WebAuth::Token::Cred(3), WebAuth::Token::Error(3), WebAuth::Token::Id(3), WebAuth::Token::Login(3), WebAuth::Token::Proxy(3), WebAuth::Token::Request(3), WebAuth::Token::WebKDCProxy(3), WebAuth::Token::WebKDCService(3)
This module is part of WebAuth. The current version is available from <http://webauth.stanford.edu/>.
2020-12-21 | perl v5.32.0 |