phpDocumentor

AuthSecret
in package

Class representing a secret code value object

Table of Contents

$secret  : string
Secret value
byRandomValue()  : AuthSecret
Return an instance with a randomly Base32-encoded value
code()  : string
Return the secret value
withCode()  : AuthSecret
Return an instance with the provided secret
__construct()  : mixed
Create instance

Properties

Methods

byRandomValue()

Return an instance with a randomly Base32-encoded value

public static byRandomValue([int $length = 16 ]) : AuthSecret
Parameters
$length : int = 16

Length of secret

Return values
AuthSecret

Instance

code()

Return the secret value

public code() : string
Return values
string

Secret value

__construct()

Create instance

private __construct(string $secret) : mixed
Parameters
$secret : string

Secret

Return values
mixed

Search results