PHP Class Auth_OpenID_FileStore

Most of the methods of this class are implementation details. People wishing to just use this store need only pay attention to the constructor.
Inheritance: extends Auth_OpenID_OpenIDStore
Afficher le fichier Open project: openid/php-openid Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $directory ) Initializes a new {@link Auth_OpenID_FileStore}. This initializes the nonce and association directories, which are subdirectories of the directory passed in.
_allAssocs ( ) Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time.
_filenameEscape ( $str )
_getAssociation ( $filename )
_isFilenameSafe ( $char )
_listdir ( $dir )
_mkdtemp ( $dir )
_mkstemp ( $dir )
_mktemp ( ) : array Create a temporary file on the same filesystem as $this->association_dir.
_removeIfPresent ( $filename ) : boolean Attempt to remove a file, returning whether the file existed at the time of the call.
_rmtree ( $dir )
_safe64 ( $str )
_setup ( ) Make sure that the directories in which we store our data exist.
clean ( )
cleanupAssociations ( )
cleanupNonces ( )
destroy ( )
getAssociation ( $server_url, $handle = null ) : mixed Retrieve an association. If no handle is specified, return the association with the most recent issue time.
getAssociationFilename ( $server_url, $handle ) : string Create a unique filename for a given server url and handle. This implementation does not assume anything about the format of the handle. The filename that is returned will contain the domain name from the server URL for ease of human inspection of the data directory.
removeAssociation ( $server_url, $handle ) : boolean Remove an association if it exists. Do nothing if it does not.
storeAssociation ( $server_url, $association ) Store an association in the association directory.
useNonce ( $server_url, $timestamp, $salt ) : boolean Return whether this nonce is present. As a side effect, mark it as no longer present.

Method Details

__construct() public méthode

Initializes a new {@link Auth_OpenID_FileStore}. This initializes the nonce and association directories, which are subdirectories of the directory passed in.
public __construct ( string $directory )
$directory string This is the directory to put the store directories in.

_allAssocs() public méthode

Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time.
public _allAssocs ( )

_filenameEscape() public méthode

public _filenameEscape ( $str )

_getAssociation() public méthode

public _getAssociation ( $filename )

_isFilenameSafe() public méthode

public _isFilenameSafe ( $char )

_listdir() public méthode

public _listdir ( $dir )

_mkdtemp() static public méthode

static public _mkdtemp ( $dir )

_mkstemp() public méthode

public _mkstemp ( $dir )

_mktemp() public méthode

The temporary directory should not be cleaned if there are any processes using the store. If there is no active process using the store, it is safe to remove all of the files in the temporary directory.
public _mktemp ( ) : array
Résultat array ($fd, $filename)

_removeIfPresent() public méthode

Attempt to remove a file, returning whether the file existed at the time of the call.
public _removeIfPresent ( $filename ) : boolean
Résultat boolean $result True if the file was present, false if not.

_rmtree() public méthode

public _rmtree ( $dir )

_safe64() public méthode

public _safe64 ( $str )

_setup() public méthode

Make sure that the directories in which we store our data exist.
public _setup ( )

clean() public méthode

public clean ( )

cleanupAssociations() public méthode

public cleanupAssociations ( )

cleanupNonces() public méthode

public cleanupNonces ( )

destroy() public méthode

public destroy ( )

getAssociation() public méthode

Retrieve an association. If no handle is specified, return the association with the most recent issue time.
public getAssociation ( $server_url, $handle = null ) : mixed
Résultat mixed $association

getAssociationFilename() public méthode

Create a unique filename for a given server url and handle. This implementation does not assume anything about the format of the handle. The filename that is returned will contain the domain name from the server URL for ease of human inspection of the data directory.
public getAssociationFilename ( $server_url, $handle ) : string
Résultat string $filename

removeAssociation() public méthode

Remove an association if it exists. Do nothing if it does not.
public removeAssociation ( $server_url, $handle ) : boolean
Résultat boolean $success

storeAssociation() public méthode

Store an association in the association directory.
public storeAssociation ( $server_url, $association )

useNonce() public méthode

Return whether this nonce is present. As a side effect, mark it as no longer present.
public useNonce ( $server_url, $timestamp, $salt ) : boolean
Résultat boolean $present