|
static | fromString ($key, $token, $assertClaims=array()) |
|
static | fromCookie ($key, $cookieName, $assertClaims=array()) |
|
static | fromRequest ($key, $attributeName, $assertClaims=array()) |
|
static | fromHeader ($key, $assertClaims=array(), $headerName='Authorization') |
|
◆ fromCookie()
static fromCookie |
( |
|
$key, |
|
|
|
$cookieName, |
|
|
|
$assertClaims = array() |
|
) |
| |
|
static |
Validate and decode a JSON Web Token string from a cookie
- Parameters
-
KeyAbstract | string | $key | the key to use to sign the token, or name of key to build |
string | $cookieName | name of cookie that sources the token |
array | \Traversable | $assertClaims | traversable set of claims, claim => value, to assert |
- Returns
- \stdClass|false payload as stdClass, or false if token was invalid
- Exceptions
-
InvalidArgumentException on unusable key name
◆ fromHeader()
static fromHeader |
( |
|
$key, |
|
|
|
$assertClaims = array() , |
|
|
|
$headerName = 'Authorization' |
|
) |
| |
|
static |
Validate and decode a JSON Web Token string from a header
- Parameters
-
KeyAbstract | string | $key | the key to use to sign the token, or name of key to build |
array | \Traversable | $assertClaims | traversable set of claims, claim => value, to assert |
string | $headerName | name of header that sources the token |
- Returns
- \stdClass|false payload as stdClass, or false if token was invalid
- Exceptions
-
InvalidArgumentException on unusable key name
◆ fromRequest()
static fromRequest |
( |
|
$key, |
|
|
|
$attributeName, |
|
|
|
$assertClaims = array() |
|
) |
| |
|
static |
Validate and decode a JSON Web Token string from a request (i.e. POST body)
- Parameters
-
KeyAbstract | string | $key | the key to use to sign the token, or name of key to build |
string | $attributeName | name of cookie that sources the token |
array | \Traversable | $assertClaims | traversable set of claims, claim => value, to assert |
- Returns
- \stdClass|false payload as stdClass, or false if token was invalid
- Exceptions
-
InvalidArgumentException on unusable key name
◆ fromString()
static fromString |
( |
|
$key, |
|
|
|
$token, |
|
|
|
$assertClaims = array() |
|
) |
| |
|
static |
Validate and decode a JSON Web Token string
- Parameters
-
KeyAbstract | string | $key | the key to use to sign the token, or name of key to build |
string | $token | the token string to validate and decode |
array | \Traversable | $assertClaims | traversable set of claims, claim => value, to assert |
- Returns
- \stdClass|false payload as stdClass, or false if token was invalid
- Exceptions
-
InvalidArgumentException on unusable key name
The documentation for this class was generated from the following file:
- C:/xoops2511b2/htdocs/class/libraries/vendor/xoops/xmf/src/Jwt/TokenReader.php