mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
54694c4fca
* [MISC] Ignore errcheck recommendations for legacy code Some of this is likely intended to stay how it is, some could use refactoring, for now we will mark is and ignore it from the linter to be potentially addressed in the future. * [MISC] Ensure files are gofmt-ed
17 lines
532 B
Go
17 lines
532 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/authelia/authelia/internal/middlewares"
|
|
)
|
|
|
|
// StateGet is the handler serving the user state.
|
|
func StateGet(ctx *middlewares.AutheliaCtx) {
|
|
userSession := ctx.GetSession()
|
|
stateResponse := StateResponse{
|
|
Username: userSession.Username,
|
|
AuthenticationLevel: userSession.AuthenticationLevel,
|
|
DefaultRedirectionURL: ctx.Configuration.DefaultRedirectionURL,
|
|
}
|
|
ctx.SetJSONBody(stateResponse) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
|
|
}
|