/** * Decodes an encoded token and returns an instance of this class * containing the decoded data. * * The decoded token can be checked for validity using the {@link isValid()} * and {@link hasScope()} methods. The data can be obtained using the * various `get` methods. * * @param string $encoded the encoded token * @return AccessToken the decoded token */ public static function decode($encoded) { $token = new AccessToken(); $token->encoded = $encoded; $token->parse(); return $token; }
/** * Returns the request access token * * @return AccessToken */ public function get_access_token() { $string = Request::get(self::PARAM_ACCESS_TOKEN); return AccessToken::parse($string); }