Tfa
extends Facade
in package
Table of Contents
Properties
- $container : Container
- $instance : mixed
Methods
- __callStatic() : mixed
- checkAuthority() : bool
- checkCorrectTime() : bool
- createSecret() : string
- getInstance() : mixed
- get service instance
- getSecretForManual() : string
- getSecretForQRCode() : string
- getSecretKey() : string|false
- isAvailable() : bool
- isAvailableAccount() : bool
- setContainer() : void
- verifyAccount() : bool
- verifyCode() : bool
- getServiceAlias() : string
- getServiceInstance() : mixed
- isCache() : bool
Properties
$container
protected
static Container
$container
$instance
protected
static mixed
$instance
Methods
__callStatic()
public
static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
checkAuthority()
public
static checkAuthority() : bool
権限をチェック
Return values
boolcheckCorrectTime()
public
static checkCorrectTime() : bool
サーバー時間が正しいかチェック
Return values
boolcreateSecret()
public
static createSecret() : string
秘密鍵を作成
Return values
stringgetInstance()
get service instance
public
static getInstance() : mixed
getSecretForManual()
public
static getSecretForManual(string $secret) : string
秘密鍵の手動入力用文字列を取得
Parameters
- $secret : string
Return values
stringgetSecretForQRCode()
public
static getSecretForQRCode(string $secret, string $label) : string
秘密鍵のQRコード画像を取得
Parameters
- $secret : string
- $label : string
Return values
stringgetSecretKey()
public
static getSecretKey(int $uid) : string|false
秘密鍵を取得
Parameters
- $uid : int
Return values
string|falseisAvailable()
public
static isAvailable() : bool
2段階認証が有効か判定
Return values
boolisAvailableAccount()
public
static isAvailableAccount(int $uid) : bool
2段階認証が有効なアカウントか判定
Parameters
- $uid : int
Return values
boolsetContainer()
public
static setContainer(Container $container) : void
Parameters
- $container : Container
verifyAccount()
public
static verifyAccount(int $uid, string $code) : bool
アカウントを検証
Parameters
- $uid : int
- $code : string
Return values
boolverifyCode()
public
static verifyCode(string $secret, string $code) : bool
コードを検証
Parameters
- $secret : string
- $code : string
Return values
boolgetServiceAlias()
protected
static getServiceAlias() : string
Return values
stringgetServiceInstance()
protected
static getServiceInstance(string $alias) : mixed
Parameters
- $alias : string
isCache()
protected
static isCache() : bool