RestApi Utility
Simple Utility helper.
$scope = new Scope();
generateToken
Generate random bearer token with RFC 6750 spec.
Please see RFC6750 for more information.
$random_token = \Samy\RestApi\Util::generateToken($token_length);
tokenExpire
Retrieve duration of token expire in seconds.
$expires_in = \Samy\RestApi\Util::tokenExpire($datetime);