Documentation
¶
Index ¶
- func InsertAuthentication(ctx context.Context, accountId string, idTokenHash []byte, ...) (*authenticationPkg.Authentication, error)
- func InsertDbscChallenge(ctx context.Context, challenge string, authenticationId string, ...) error
- func InsertOauthFlow(ctx context.Context, state string, codeVerifier string, redirectUrl string, ...) (*oauth_flow.Flow, error)
- func PopDbscChallenge(ctx context.Context, challenge string, authenticationId string, db *sql.DB) (*dbsc_challenge.Challenge, error)
- func PopExpiredOauthFlowByState(ctx context.Context, state string, now time.Time, db *sql.DB) (*oauth_flow.Flow, error)
- func PopOauthFlow(ctx context.Context, id string, db *sql.DB) (*oauth_flow.Flow, error)
- func SelectEmailAddressAccount(ctx context.Context, emailAddress string, database *sql.DB) (*accountPkg.Account, error)
- func SelectIdTokenHashUsed(ctx context.Context, idTokenHash []byte, database *sql.DB) (bool, error)
- func SelectRefreshAuthentication(ctx context.Context, id string, database *sql.DB) (*authenticationPkg.Authentication, error)
- func UpdateAuthenticationWithDbscPublicKey(ctx context.Context, id string, key []byte, database *sql.DB) error
- func UpdateAuthenticationWithEnded(ctx context.Context, id string, database *sql.DB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertAuthentication ¶
func InsertAuthentication( ctx context.Context, accountId string, idTokenHash []byte, expirationDuration time.Duration, metadata *authenticationPkg.ClientMetadata, database *sql.DB, ) (*authenticationPkg.Authentication, error)
func InsertDbscChallenge ¶
func InsertOauthFlow ¶
func PopDbscChallenge ¶
func PopExpiredOauthFlowByState ¶ added in v1.22.0
func PopExpiredOauthFlowByState(ctx context.Context, state string, now time.Time, db *sql.DB) (*oauth_flow.Flow, error)
PopExpiredOauthFlowByState removes and returns the flow the state names if it expired by now; a live flow is neither removed nor returned. The code verifier is not returned: what is popped this way is never redeemed.
func PopOauthFlow ¶
func SelectIdTokenHashUsed ¶ added in v1.13.0
SelectIdTokenHashUsed reports whether an authentication was already created from the token the hash names, which is what InsertAuthentication refuses a second time.
func SelectRefreshAuthentication ¶
func SelectRefreshAuthentication(ctx context.Context, id string, database *sql.DB) (*authenticationPkg.Authentication, error)
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
types
|
|
|
api_key
Package api_key holds the public keys an account registers to mint tokens with.
|
Package api_key holds the public keys an account registers to mint tokens with. |
|
api_key_assertion
Package api_key_assertion remembers the assertions a key has already minted with, for as long as they could still be presented again.
|
Package api_key_assertion remembers the assertions a key has already minted with, for as long as they could still be presented again. |
|
api_key_authentication
Package api_key_authentication links a sign-in to the key that minted it.
|
Package api_key_authentication links a sign-in to the key that minted it. |
|
oauth_authorization
Package oauth_authorization is what the OAuth authorization server keeps, as tables.
|
Package oauth_authorization is what the OAuth authorization server keeps, as tables. |
Click to show internal directories.
Click to hide internal directories.