Documentation
¶
Overview ¶
Package postgres provides PostgreSQL storage for OAuth.
Index ¶
- type Store
- func (s *Store) CleanupExpiredCodes(ctx context.Context) error
- func (s *Store) CleanupExpiredTokens(ctx context.Context) error
- func (s *Store) CreateClient(ctx context.Context, client *oauth.Client) error
- func (s *Store) DeleteAuthorizationCode(ctx context.Context, codeValue string) error
- func (s *Store) DeleteClient(ctx context.Context, clientID string) error
- func (s *Store) DeleteRefreshToken(ctx context.Context, tokenValue string) error
- func (s *Store) DeleteRefreshTokensForClient(ctx context.Context, clientID string) error
- func (s *Store) GetAuthorizationCode(ctx context.Context, codeValue string) (*oauth.AuthorizationCode, error)
- func (s *Store) GetClient(ctx context.Context, clientID string) (*oauth.Client, error)
- func (s *Store) GetRefreshToken(ctx context.Context, tokenValue string) (*oauth.RefreshToken, error)
- func (s *Store) ListClients(ctx context.Context) ([]*oauth.Client, error)
- func (s *Store) SaveAuthorizationCode(ctx context.Context, code *oauth.AuthorizationCode) error
- func (s *Store) SaveRefreshToken(ctx context.Context, token *oauth.RefreshToken) error
- func (s *Store) UpdateClient(ctx context.Context, client *oauth.Client) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements oauth.Storage using PostgreSQL.
func (*Store) CleanupExpiredCodes ¶
CleanupExpiredCodes removes expired authorization codes.
func (*Store) CleanupExpiredTokens ¶
CleanupExpiredTokens removes expired refresh tokens.
func (*Store) CreateClient ¶
CreateClient creates a new OAuth client.
func (*Store) DeleteAuthorizationCode ¶
DeleteAuthorizationCode deletes an authorization code.
func (*Store) DeleteClient ¶
DeleteClient deletes a client.
func (*Store) DeleteRefreshToken ¶
DeleteRefreshToken deletes a refresh token.
func (*Store) DeleteRefreshTokensForClient ¶
DeleteRefreshTokensForClient deletes all refresh tokens for a client.
func (*Store) GetAuthorizationCode ¶
func (s *Store) GetAuthorizationCode(ctx context.Context, codeValue string) (*oauth.AuthorizationCode, error)
GetAuthorizationCode retrieves an authorization code.
func (*Store) GetRefreshToken ¶
func (s *Store) GetRefreshToken(ctx context.Context, tokenValue string) (*oauth.RefreshToken, error)
GetRefreshToken retrieves a refresh token.
func (*Store) ListClients ¶
ListClients lists all clients.
func (*Store) SaveAuthorizationCode ¶
SaveAuthorizationCode saves an authorization code.
func (*Store) SaveRefreshToken ¶
SaveRefreshToken saves a refresh token.