Documentation ¶
Index ¶
- Constants
- func CreateJWT(payload map[string]interface{}, validitySecondsPointer *uint64) (jwtmodels.CreateJWTResponse, error)
- func CreateNewSession(res http.ResponseWriter, userID string, ...) (sessmodels.SessionContainer, error)
- func GetAllSessionHandlesForUser(userID string) ([]string, error)
- func GetJWKS() (jwtmodels.GetJWKSResponse, error)
- func GetOpenIdDiscoveryConfiguration() (openidmodels.GetOpenIdDiscoveryConfigurationResponse, error)
- func GetSession(req *http.Request, res http.ResponseWriter, ...) (*sessmodels.SessionContainer, error)
- func GetSessionFromRequestContext(ctx context.Context) *sessmodels.SessionContainer
- func GetSessionInformation(sessionHandle string) (sessmodels.SessionInformation, error)
- func GetTopLevelDomainForSameSiteResolution(URL string) (string, error)
- func GetURLScheme(URL string) (string, error)
- func Init(config *sessmodels.TypeInput) supertokens.Recipe
- func RefreshSession(req *http.Request, res http.ResponseWriter) (sessmodels.SessionContainer, error)
- func ResetForTest()
- func RevokeAllSessionsForUser(userID string) ([]string, error)
- func RevokeMultipleSessions(sessionHandles []string) ([]string, error)
- func RevokeSession(sessionHandle string) (bool, error)
- func UpdateAccessTokenPayload(sessionHandle string, newAccessTokenPayload map[string]interface{}) error
- func UpdateSessionData(sessionHandle string, newSessionData map[string]interface{}) error
- func VerifySession(options *sessmodels.VerifySessionOptions, otherHandler http.HandlerFunc) http.HandlerFunc
- func VerifySessionHelper(recipeInstance Recipe, options *sessmodels.VerifySessionOptions, ...) http.HandlerFunc
- type Recipe
- type SessionContainerInput
- type TokenInfo
Constants ¶
View Source
const RECIPE_ID = "session"
Variables ¶
This section is empty.
Functions ¶
func CreateJWT ¶ added in v0.3.2
func CreateJWT(payload map[string]interface{}, validitySecondsPointer *uint64) (jwtmodels.CreateJWTResponse, error)
func CreateNewSession ¶
func CreateNewSession(res http.ResponseWriter, userID string, accessTokenPayload map[string]interface{}, sessionData map[string]interface{}) (sessmodels.SessionContainer, error)
func GetJWKS ¶ added in v0.3.2
func GetJWKS() (jwtmodels.GetJWKSResponse, error)
func GetOpenIdDiscoveryConfiguration ¶ added in v0.3.2
func GetOpenIdDiscoveryConfiguration() (openidmodels.GetOpenIdDiscoveryConfigurationResponse, error)
func GetSession ¶
func GetSession(req *http.Request, res http.ResponseWriter, options *sessmodels.VerifySessionOptions) (*sessmodels.SessionContainer, error)
func GetSessionFromRequestContext ¶
func GetSessionFromRequestContext(ctx context.Context) *sessmodels.SessionContainer
func GetSessionInformation ¶
func GetSessionInformation(sessionHandle string) (sessmodels.SessionInformation, error)
func GetURLScheme ¶ added in v0.0.5
func Init ¶
func Init(config *sessmodels.TypeInput) supertokens.Recipe
func RefreshSession ¶
func RefreshSession(req *http.Request, res http.ResponseWriter) (sessmodels.SessionContainer, error)
func ResetForTest ¶
func ResetForTest()
func RevokeMultipleSessions ¶
func RevokeSession ¶
func UpdateAccessTokenPayload ¶ added in v0.1.0
func UpdateSessionData ¶
func VerifySession ¶
func VerifySession(options *sessmodels.VerifySessionOptions, otherHandler http.HandlerFunc) http.HandlerFunc
func VerifySessionHelper ¶
func VerifySessionHelper(recipeInstance Recipe, options *sessmodels.VerifySessionOptions, otherHandler http.HandlerFunc) http.HandlerFunc
Types ¶
type Recipe ¶
type Recipe struct { RecipeModule supertokens.RecipeModule Config sessmodels.TypeNormalisedInput RecipeImpl sessmodels.RecipeInterface OpenIdRecipe *openid.Recipe APIImpl sessmodels.APIInterface }
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *sessmodels.TypeInput, onGeneralError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)
type SessionContainerInput ¶
type SessionContainerInput struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.