Ejemplo n.º 1
0
 public static function createFromRefreshToken(RefreshToken $refresh_token, $scope = null, $lifetime = 3600)
 {
     $instance = new self();
     $instance->value = Rand::getString($instance->len, OAuth2Protocol::VsChar, true);
     $instance->scope = $scope;
     $instance->from_ip = $refresh_token->getFromIp();
     $instance->user_id = $refresh_token->getUserId();
     $instance->client_id = $refresh_token->getClientId();
     $instance->auth_code = null;
     $instance->refresh_token = $refresh_token;
     $instance->audience = $refresh_token->getAudience();
     $instance->lifetime = intval($lifetime);
     $instance->is_hashed = false;
     return $instance;
 }