Auth: add expired token error and update CreateToken function (#30203)

* Auth: add error for expired token

* Auth: save token error into context data

* Auth: send full user and req context to CreateToken

* Auth: add token ID in context

* add TokenExpiredError struct

* update auth tests

* remove most of the changes to CreateToken func

* clean up

* Login: add requestURI in CreateToken ctx

* update RequestURIKey comment
This commit is contained in:
Agnès Toulet
2021-01-19 17:55:53 +01:00
committed by GitHub
parent 218a8de220
commit 2a70c73025
7 changed files with 47 additions and 25 deletions

View File

@ -46,6 +46,10 @@ type LoginInfo struct {
Error error
}
// RequestURIKey is used as key to save request URI in contexts
// (used for the Enterprise auditing feature)
type RequestURIKey struct{}
// ---------------------
// COMMANDS