Michael Peters > Smolder > Smolder::AuthInfo

Download:
Smolder-1.51.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  7
Open  15
View/Report Bugs
Source   Latest Release: Smolder-1.52

NAME ^

Smolder::AuthInfo

DESCRIPTION ^

Utility class to manage authentication tickets.

METHODS ^

new

Returns a new object.

    my $ai = Smolder::AuthInfo->new();

ticket

Return a new auth ticket given an id and groups.

    $ai->ticket(
        id     => $dev->id,
        groups => [qw(developer admin)],
    );

parse

Parse an auth ticket. The user's id and groups are then available in the id() and groups() methods if the ticket was not tampered with.

    $ai->parse($string);
    my $id = $at->id;
    my $groups = $at->groups;

groups ^

Returns an array reference containing the groups of the most recently parsed auth ticket.

id ^

Returns the id of the most recently parsed auth ticket.

syntax highlighting: