Documentation
¶
Index ¶
- Constants
- func NewFallbackRevoker(revokers ...tokenRevoker) tokenRevoker
- type Client
- type Config
- type Credentials
- func (c *Credentials) ProcessRevocationBatch(ctx context.Context, now time.Time) (int64, bool, error)
- func (c *Credentials) PromoteProviderLink(ctx context.Context, userID uuid.UUID, linkID uuid.UUID) error
- func (c *Credentials) QueueRevocation(ctx context.Context, refreshToken string) error
- func (c *Credentials) Revoke(ctx context.Context, refreshToken string) error
- func (c *Credentials) Save(ctx context.Context, userID uuid.UUID, refreshToken string) error
- func (c *Credentials) StageProviderLink(ctx context.Context, linkID uuid.UUID, refreshToken string, ...) error
- type ExchangeResult
- type Identity
Constants ¶
const ( Issuer = "https://appleid.apple.com" JWKSURL = "https://appleid.apple.com/auth/keys" TokenURL = "https://appleid.apple.com/auth/token" RevokeURL = "https://appleid.apple.com/auth/revoke" )
Variables ¶
This section is empty.
Functions ¶
func NewFallbackRevoker ¶ added in v0.27.0
func NewFallbackRevoker(revokers ...tokenRevoker) tokenRevoker
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func NewCredentials ¶
func (*Credentials) ProcessRevocationBatch ¶
func (c *Credentials) ProcessRevocationBatch(ctx context.Context, now time.Time) (int64, bool, error)
ProcessRevocationBatch processes one token at a time. The maintenance coordinator supplies the transaction and leader fencing, while failures are committed with a later retry time so one unavailable token cannot block the rest of the queue.
func (*Credentials) PromoteProviderLink ¶
func (c *Credentials) PromoteProviderLink(ctx context.Context, userID uuid.UUID, linkID uuid.UUID) error
PromoteProviderLink turns a staged token into the linked account's current Apple credential. Callers invoke this inside the provider-link transaction.
func (*Credentials) QueueRevocation ¶
func (c *Credentials) QueueRevocation(ctx context.Context, refreshToken string) error
func (*Credentials) Revoke ¶
func (c *Credentials) Revoke(ctx context.Context, refreshToken string) error
func (*Credentials) StageProviderLink ¶
func (c *Credentials) StageProviderLink(ctx context.Context, linkID uuid.UUID, refreshToken string, expiresAt time.Time) error
StageProviderLink keeps a newly issued refresh token encrypted until the existing account owner proves control. If the link is abandoned, the normal revocation worker processes the token when the pending link expires.