Documentation
¶
Index ¶
- type CreateRefreshTokenParams
- type DBTX
- type ListLiveScopesBySubjectAndClientParams
- type LockSubjectClientParams
- type Querier
- type Queries
- func (q *Queries) CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) error
- func (q *Queries) DeactivateRefreshToken(ctx context.Context, signature string) (int64, error)
- func (q *Queries) DeleteRefreshToken(ctx context.Context, signature string) (int64, error)
- func (q *Queries) GetRefreshToken(ctx context.Context, signature string) (RefreshToken, error)
- func (q *Queries) ListLiveScopesBySubjectAndClient(ctx context.Context, arg ListLiveScopesBySubjectAndClientParams) ([][]string, error)
- func (q *Queries) LockSubjectClient(ctx context.Context, arg LockSubjectClientParams) error
- func (q *Queries) LockSubjectClientBySignature(ctx context.Context, signature string) (int64, error)
- func (q *Queries) RevokeRefreshTokensByRequestID(ctx context.Context, requestID string) error
- func (q *Queries) RevokeRefreshTokensBySubjectAndClient(ctx context.Context, arg RevokeRefreshTokensBySubjectAndClientParams) (int64, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RefreshToken
- type RevokeRefreshTokensBySubjectAndClientParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRefreshTokenParams ¶
type CreateRefreshTokenParams struct {
Signature string
RequestID string
ClientID string
Subject string
RequestedScopes []string
GrantedScopes []string
RequestedAudiences []string
GrantedAudiences []string
FormData string
SessionData []byte
AccessTokenSignature string
RequestedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
}
type ListLiveScopesBySubjectAndClientParams ¶ added in v1.118.0
type LockSubjectClientParams ¶ added in v1.69.1
type Querier ¶
type Querier interface {
CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) error
// Only the signature names the presented token: request_id is shared by the
// whole grant.
DeactivateRefreshToken(ctx context.Context, signature string) (int64, error)
DeleteRefreshToken(ctx context.Context, signature string) (int64, error)
GetRefreshToken(ctx context.Context, signature string) (RefreshToken, error)
ListLiveScopesBySubjectAndClient(ctx context.Context, arg ListLiveScopesBySubjectAndClientParams) ([][]string, error)
// Rotation and de-authorization take this lock before touching any row of
// the pair, so neither can commit rows the other's statements do not see.
LockSubjectClient(ctx context.Context, arg LockSubjectClientParams) error
// Rotation knows only the presented signature. Zero rows means the token is
// gone, which the caller treats as inactive.
LockSubjectClientBySignature(ctx context.Context, signature string) (int64, error)
RevokeRefreshTokensByRequestID(ctx context.Context, requestID string) error
RevokeRefreshTokensBySubjectAndClient(ctx context.Context, arg RevokeRefreshTokensBySubjectAndClientParams) (int64, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateRefreshToken ¶
func (q *Queries) CreateRefreshToken(ctx context.Context, arg CreateRefreshTokenParams) error
func (*Queries) DeactivateRefreshToken ¶ added in v1.82.1
Only the signature names the presented token: request_id is shared by the whole grant.
func (*Queries) DeleteRefreshToken ¶
func (*Queries) GetRefreshToken ¶
func (*Queries) ListLiveScopesBySubjectAndClient ¶ added in v1.118.0
func (*Queries) LockSubjectClient ¶ added in v1.69.1
func (q *Queries) LockSubjectClient(ctx context.Context, arg LockSubjectClientParams) error
Rotation and de-authorization take this lock before touching any row of the pair, so neither can commit rows the other's statements do not see.
func (*Queries) LockSubjectClientBySignature ¶ added in v1.69.1
func (q *Queries) LockSubjectClientBySignature(ctx context.Context, signature string) (int64, error)
Rotation knows only the presented signature. Zero rows means the token is gone, which the caller treats as inactive.
func (*Queries) RevokeRefreshTokensByRequestID ¶
func (*Queries) RevokeRefreshTokensBySubjectAndClient ¶ added in v1.63.0
type RefreshToken ¶
type RefreshToken struct {
Signature string
RequestID string
ClientID string
Subject string
RequestedScopes []string
GrantedScopes []string
RequestedAudiences []string
GrantedAudiences []string
FormData string
SessionData []byte
AccessTokenSignature string
Active bool
RequestedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}
type RevokeRefreshTokensBySubjectAndClientParams ¶ added in v1.63.0
Click to show internal directories.
Click to hide internal directories.