auth

package
v0.0.0-...-6bdf688 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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 GetUser

func GetUser(r *http.Request) *user.User

GetUser - gets user object from request context

func GetUserFromCtx

func GetUserFromCtx(ctx context.Context) *user.User

GetUserFromCtx- get user from given context

func GetUserID

func GetUserID(r *http.Request) (id string)

GetUserID - gets current user ID from this request

func GetUserIDFromCtx

func GetUserIDFromCtx(ctx context.Context) string

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

func SetUserIDCtx

func SetUserIDCtx(ctx context.Context, id string) context.Context

SetUserIDCtx - set user ID to given context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL