Exemple #1
0
func (a *ContextAuthenticator) UserID(request *http.Request) string {
	return context.Load(request).UserId
}
Exemple #2
0
func (a *ContextAuthenticator) SetUserID(writer http.ResponseWriter, request *http.Request, userId string) {
	var ctx = context.Load(request)
	ctx.UserId = userId
	ctx.Save(request)
}
Exemple #3
0
func (a *ContextAuthenticator) IsAuthenticated(request *http.Request) bool {
	return context.Load(request).IsAuthenticated()
}