mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: handle reauth correctly (max_age=0 or prompt=login) (#1870)
* max age * merge main * fix when no prompt is set * fix: update oidc pkg * fix tests
This commit is contained in:
@@ -18,11 +18,11 @@ type AuthRequest struct {
|
||||
ApplicationID string
|
||||
CallbackURI string
|
||||
TransferState string
|
||||
Prompt Prompt
|
||||
Prompt []Prompt
|
||||
PossibleLOAs []LevelOfAssurance
|
||||
UiLocales []string
|
||||
LoginHint string
|
||||
MaxAuthAge uint32
|
||||
MaxAuthAge *time.Duration
|
||||
Request Request
|
||||
|
||||
levelOfAssurance LevelOfAssurance
|
||||
@@ -75,6 +75,15 @@ const (
|
||||
PromptCreate
|
||||
)
|
||||
|
||||
func IsPrompt(prompt []Prompt, requestedPrompt Prompt) bool {
|
||||
for _, p := range prompt {
|
||||
if p == requestedPrompt {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type LevelOfAssurance int
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user