TokenReader
The
Xmf\Jwt\TokenReader
class provides convenience methods to simplify reading JSON Web Tokens.Validate and decode a JSON Web Token string
The $key is the key that was used to to sign the token. It may be specified as a KeyAbstract object, or a key name string that will be used to build a key object using the KeyFactory using a default FileStorage instance for storage.
The $assertClaims array specifies application specific public or claims that are verified while decoding.
Returns the token payload as stdClass, or false if token was invalid.
Extracts a token string from the cookie named by $cookieName, and uses
TokenReader::fromString()
to process using the specified $key and $assertClaims.Returns the token payload as stdClass, or false if token was invalid.
Extracts a token string from the cookie named by $attributeName, and uses
TokenReader::fromString()
to process using the specified $key and $assertClaims.Returns the token payload as stdClass, or false if token was invalid.
Extracts a token string from the cookie named by $headerName, and uses
TokenReader::fromString()
to process using the specified $key and $assertClaims.The header is expected to be an bearer token in the authorization header. The default for $headerName should not normally need to be changed.
Returns the token payload as stdClass, or false if token was invalid.
Last modified 5yr ago