getTokenType() public method

public getTokenType ( )
示例#1
0
 public function storeAccessToken(AccessToken $accessToken)
 {
     $stmt = $this->db->prepare(sprintf('INSERT INTO %s (client_config_id, user_id, scope, access_token, token_type, expires_in, issue_time) VALUES(:client_config_id, :user_id, :scope, :access_token, :token_type, :expires_in, :issue_time)', $this->prefix . 'access_tokens'));
     $stmt->bindValue(':client_config_id', $accessToken->getClientConfigId(), PDO::PARAM_STR);
     $stmt->bindValue(':user_id', $accessToken->getUserId(), PDO::PARAM_STR);
     $stmt->bindValue(':scope', $accessToken->getScope()->toString(), PDO::PARAM_STR);
     $stmt->bindValue(':access_token', $accessToken->getAccessToken(), PDO::PARAM_STR);
     $stmt->bindValue(':token_type', $accessToken->getTokenType(), PDO::PARAM_STR);
     $stmt->bindValue(':expires_in', $accessToken->getExpiresIn(), PDO::PARAM_INT);
     $stmt->bindValue(':issue_time', $accessToken->getIssueTime(), PDO::PARAM_INT);
     $stmt->execute();
     return 1 === $stmt->rowCount();
 }
示例#2
0
 public function storeAccessToken(AccessToken $accessToken)
 {
     $stmt = $this->db->prepare("INSERT INTO access_tokens (client_config_id, user_id, scope, access_token, token_type, expires_in, issue_time) VALUES(:client_config_id, :user_id, :scope, :access_token, :token_type, :expires_in, :issue_time)");
     $stmt->bindValue(":client_config_id", $accessToken->getClientConfigId(), PDO::PARAM_STR);
     $stmt->bindValue(":user_id", $accessToken->getUserId(), PDO::PARAM_STR);
     $stmt->bindValue(":scope", $accessToken->getScope()->isEmptyScope() ? null : $accessToken->getScope()->getScopeAsString(), PDO::PARAM_STR);
     $stmt->bindValue(":access_token", $accessToken->getAccessToken(), PDO::PARAM_STR);
     $stmt->bindValue(":token_type", $accessToken->getTokenType(), PDO::PARAM_STR);
     $stmt->bindValue(":expires_in", $accessToken->getExpiresIn(), PDO::PARAM_INT);
     $stmt->bindValue(":issue_time", $accessToken->getIssueTime(), PDO::PARAM_INT);
     $stmt->execute();
     return 1 === $stmt->rowCount();
 }