PHP 클래스 Trianglman\Sqrl\SqrlStoreStatelessAbstract

Rather than storing the values important to the nut in stateful storage, the values will be encrypted into the nut.
저자: johnj
상속: implements Trianglman\Sqrl\SqrlStoreInterface
파일 보기 프로젝트 열기: trianglman/sqrl

공개 메소드들

메소드 설명
generateNut ( integer $tif, string $key = '', string $oldnut = '' ) : string Creates a nut from the supplied data
getNutDetails ( string $nut, $debug = false ) : array: Retrieves information about the supplied nut
logSessionIn ( $requestNut )
setNonceSalt ( string $salt ) : void Sets the password for nonce encryption

보호된 메소드들

메소드 설명
addSessionNut ( string $newNut, $sessionId ) : void Adds a nut to the user's current session
base64URLDecode ( type $string ) : type Base 64 URL decodes a string
base64UrlEncode ( string $string, type $stripEquals = true ) : string Base 64 URL encodes a string
getCurrentSessionId ( ) : string Gets the user's current session ID
getIp ( ) : string Gets the user's IP address
getSessionInfo ( string $sessionId ) : array Gets the session information that matches the supplied session ID
setSessionValue ( string $sessionId, string $key, string $value ) : void Sets or updates a value in the user session

메소드 상세

addSessionNut() 보호된 메소드

Adds a nut to the user's current session
protected addSessionNut ( string $newNut, $sessionId ) : void
$newNut string
리턴 void

base64URLDecode() 보호된 메소드

Basically the same as base64 decoding, but replacing URL safe "-" with "+" and "_" with "/". Automatically detects if the trailing "=" padding has been removed.
protected base64URLDecode ( type $string ) : type
$string type
리턴 type

base64UrlEncode() 보호된 메소드

Basically the same as base64 encoding, but replacing "+" with "-" and "/" with "_" to make it safe to include in a URL Optionally removes trailing "=" padding characters.
protected base64UrlEncode ( string $string, type $stripEquals = true ) : string
$string string The string to encode
$stripEquals type [Optional] Whether to strip the "=" off of the end
리턴 string

generateNut() 공개 메소드

Takes the nut data, compacts it into a usable format with date, session and random info data, and encrypts it into a usable nut
public generateNut ( integer $tif, string $key = '', string $oldnut = '' ) : string
$tif integer The action associated with the nut
$key string The authentication key the nut is for
$oldnut string The previous nut in this transacion. Information from this nut will be used to help store the new nut in the right session.
리턴 string

getCurrentSessionId() 추상적인 보호된 메소드

Gets the user's current session ID
abstract protected getCurrentSessionId ( ) : string
리턴 string

getIp() 추상적인 보호된 메소드

Gets the user's IP address
abstract protected getIp ( ) : string
리턴 string

getNutDetails() 공개 메소드

Retrieves information about the supplied nut
public getNutDetails ( string $nut, $debug = false ) : array:
$nut string The nonce to retrieve information on
리턴 array:

getSessionInfo() 추상적인 보호된 메소드

Gets the session information that matches the supplied session ID
abstract protected getSessionInfo ( string $sessionId ) : array
$sessionId string
리턴 array

logSessionIn() 공개 메소드

public logSessionIn ( $requestNut )

setNonceSalt() 공개 메소드

Sets the password for nonce encryption
public setNonceSalt ( string $salt ) : void
$salt string
리턴 void

setSessionValue() 추상적인 보호된 메소드

Sets or updates a value in the user session
abstract protected setSessionValue ( string $sessionId, string $key, string $value ) : void
$sessionId string
$key string
$value string
리턴 void