Documentation ¶
Index ¶
- func GetAuthenticationType(r *http.Request) user.AuthenticationType
- func GetUser(r *http.Request) *user.User
- func GetUserFromCtx(ctx context.Context) *user.User
- func GetUserID(r *http.Request) (id string)
- func GetUserIDFromCtx(ctx context.Context) string
- func SetAuthenticationDetails(r *http.Request, user *user.User, authenticationType user.AuthenticationType) *http.Request
- func SetAuthenticationDetailsCtx(ctx context.Context, user *user.User, ...) context.Context
- func SetUserIDCtx(ctx context.Context, id string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticationType ¶
func GetAuthenticationType(r *http.Request) user.AuthenticationType
GetAuthenticationType - get authentication type
func GetUserFromCtx ¶
GetUserFromCtx- get user from given context
func GetUserIDFromCtx ¶
GetUserIDFromCtx - get user ID from context
func SetAuthenticationDetails ¶
func SetAuthenticationDetails(r *http.Request, user *user.User, authenticationType user.AuthenticationType) *http.Request
SetAuthenticationDetails sets user details for this request
func SetAuthenticationDetailsCtx ¶
func SetAuthenticationDetailsCtx(ctx context.Context, user *user.User, authenticationType user.AuthenticationType) context.Context
SetAuthenticationDetailsCtx set user details to the given context and return a new ctx
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.