PHP 클래스 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.
상속: extends Auth_OpenID_OpenIDStore
파일 보기 프로젝트 열기: openid/php-openid 1 사용 예제들

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

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() 공개 메소드

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

_filenameEscape() 공개 메소드

public _filenameEscape ( $str )

_getAssociation() 공개 메소드

public _getAssociation ( $filename )

_isFilenameSafe() 공개 메소드

public _isFilenameSafe ( $char )

_listdir() 공개 메소드

public _listdir ( $dir )

_mkdtemp() 정적인 공개 메소드

static public _mkdtemp ( $dir )

_mkstemp() 공개 메소드

public _mkstemp ( $dir )

_mktemp() 공개 메소드

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
리턴 array ($fd, $filename)

_removeIfPresent() 공개 메소드

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

_rmtree() 공개 메소드

public _rmtree ( $dir )

_safe64() 공개 메소드

public _safe64 ( $str )

_setup() 공개 메소드

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

clean() 공개 메소드

public clean ( )

cleanupAssociations() 공개 메소드

public cleanupAssociations ( )

cleanupNonces() 공개 메소드

public cleanupNonces ( )

destroy() 공개 메소드

public destroy ( )

getAssociation() 공개 메소드

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

getAssociationFilename() 공개 메소드

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
리턴 string $filename

removeAssociation() 공개 메소드

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

storeAssociation() 공개 메소드

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

useNonce() 공개 메소드

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