Documentation ¶
Index ¶
- Constants
- type APIInterface
- type APIOptions
- type CreateOrRefreshAPIResponse
- type CreateOrRefreshAPIResponseToken
- type ErrorHandlers
- type GetSessionResponse
- type HandshakeInfo
- type KeyInfo
- type NormalisedErrorHandlers
- type OverrideStruct
- type RecipeInterface
- type SessionContainer
- type SessionInformation
- type SessionStruct
- type SignOutPOSTResponse
- type TypeInput
- type TypeNormalisedInput
- type VerifySessionOptions
Constants ¶
View Source
const SessionContext int = iota
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface struct { RefreshPOST func(options APIOptions) error SignOutPOST func(options APIOptions) (SignOutPOSTResponse, error) VerifySession func(verifySessionOptions *VerifySessionOptions, options APIOptions) (*SessionContainer, error) }
type APIOptions ¶
type APIOptions struct { RecipeImplementation RecipeInterface Config TypeNormalisedInput RecipeID string Req *http.Request Res http.ResponseWriter OtherHandler http.HandlerFunc }
type CreateOrRefreshAPIResponse ¶
type CreateOrRefreshAPIResponse struct { Session SessionStruct `json:"session"` AccessToken CreateOrRefreshAPIResponseToken `json:"accessToken"` RefreshToken CreateOrRefreshAPIResponseToken `json:"refreshToken"` IDRefreshToken CreateOrRefreshAPIResponseToken `json:"idRefreshToken"` AntiCsrfToken *string `json:"antiCsrfToken"` }
type ErrorHandlers ¶
type GetSessionResponse ¶
type GetSessionResponse struct { Session SessionStruct `json:"session"` AccessToken CreateOrRefreshAPIResponseToken `json:"accessToken"` }
type HandshakeInfo ¶
type HandshakeInfo struct { AntiCsrf string AccessTokenBlacklistingEnabled bool AccessTokenValidity uint64 RefreshTokenValidity uint64 // contains filtered or unexported fields }
func (*HandshakeInfo) GetJwtSigningPublicKeyList ¶ added in v0.0.2
func (h *HandshakeInfo) GetJwtSigningPublicKeyList() []KeyInfo
func (*HandshakeInfo) SetJwtSigningPublicKeyList ¶ added in v0.0.2
func (h *HandshakeInfo) SetJwtSigningPublicKeyList(updatedList []KeyInfo)
type NormalisedErrorHandlers ¶
type OverrideStruct ¶
type OverrideStruct struct { Functions func(originalImplementation RecipeInterface) RecipeInterface APIs func(originalImplementation APIInterface) APIInterface }
type RecipeInterface ¶
type RecipeInterface struct { CreateNewSession func(res http.ResponseWriter, userID string, jwtPayload map[string]interface{}, sessionData map[string]interface{}) (SessionContainer, error) GetSession func(req *http.Request, res http.ResponseWriter, options *VerifySessionOptions) (*SessionContainer, error) RefreshSession func(req *http.Request, res http.ResponseWriter) (SessionContainer, error) GetSessionInformation func(sessionHandle string) (SessionInformation, error) RevokeAllSessionsForUser func(userID string) ([]string, error) GetAllSessionHandlesForUser func(userID string) ([]string, error) RevokeSession func(sessionHandle string) (bool, error) RevokeMultipleSessions func(sessionHandles []string) ([]string, error) UpdateSessionData func(sessionHandle string, newSessionData map[string]interface{}) error UpdateJWTPayload func(sessionHandle string, newJWTPayload map[string]interface{}) error GetAccessTokenLifeTimeMS func() (uint64, error) GetRefreshTokenLifeTimeMS func() (uint64, error) }
type SessionContainer ¶
type SessionContainer struct { RevokeSession func() error GetSessionData func() (map[string]interface{}, error) UpdateSessionData func(newSessionData map[string]interface{}) error GetUserID func() string GetJWTPayload func() map[string]interface{} GetHandle func() string GetAccessToken func() string UpdateJWTPayload func(newJWTPayload map[string]interface{}) error GetTimeCreated func() (uint64, error) GetExpiry func() (uint64, error) }
type SessionInformation ¶
type SessionStruct ¶
type SignOutPOSTResponse ¶
type SignOutPOSTResponse struct {
OK *struct{}
}
type TypeInput ¶
type TypeInput struct { CookieSecure *bool CookieSameSite *string SessionExpiredStatusCode *int CookieDomain *string AntiCsrf *string Override *OverrideStruct ErrorHandlers *ErrorHandlers }
type TypeNormalisedInput ¶
type TypeNormalisedInput struct { RefreshTokenPath supertokens.NormalisedURLPath CookieDomain *string CookieSameSite string CookieSecure bool SessionExpiredStatusCode int AntiCsrf string Override OverrideStruct ErrorHandlers NormalisedErrorHandlers }
type VerifySessionOptions ¶
Click to show internal directories.
Click to hide internal directories.