hod > Aut > Aut::Ticket

Download:
Aut-0.11.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Aut::Ticket - Authorization Framework - Tickets

SYNOPSIS ^

See Aut. =head1 ABSTRACT

'Aut::Ticket' is part of the 'Aut' authorization framework It provides tickets that are the user's access to services and application parts. It also provides encryption/decryption for user data.

DESCRIPTION ^

Instantiating

new(account,password) --> Aut::Ticket

This method initializes a ticket with a given account and password and generates a new seed.

Querying

valid() --> boolean

Returns true, if the ticket is valid, returns False, otherwise.

rights() --> string

Returns the currently assigned "rights" value to this ticket.

account() --> string

Returns the currently assigned account for this ticket.

pass() --> string

Returns the currently assigned password for this ticket.

seed() --> string

Returns the seed value of this ticket that is being used for encryption/decryption.

get(var) --> string

Gets value for 'var' from the ticket.

Setting

invalidate() --> void

Invalidates a ticket.

set_rights(_rights) --> void

Sets the rights value of the ticket to _rights.

set_pass(_pass) --> void

Sets the password of the ticket to _pass.

set_seed(_seed) --> void

Sets the seed value of the ticket (the encryption key) to _seed.

set(var,val) --> void

Sets a variable 'var' in the ticket to value 'val'.

Encryption/Decryption

encrypt(text) --> base64 string

Encrypts text using Aut::Crypt, with key seed(); returns a base64 encoded (with Aut::Base64) encrypted string.

decrypt(ciphertext) --> string

Decrypts text using Aut::Crypt, after it has been decoded with Aut::Base64. If the decryption is valid, it returns the decrypted string, otherwise undef is returned.

SEE ALSO ^

Aut framework, Aut::Base64, Aut::Crypt.

AUTHOR ^

Hans Oesterholt-Dijkema <oesterhol@cpan.org>

COPYRIGHT AND LICENSE ^

This library is free software; you can redistribute it and/or modify it under Artistic license.

syntax highlighting: