mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
feat(api): add OIDC session service (#6157)
This PR starts the OIDC implementation for the API V2 including the Implicit and Code Flow. Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Tim Möhlmann <tim+github@zitadel.com> Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
This commit is contained in:
@@ -116,6 +116,17 @@ const (
|
||||
MFALevelMultiFactorCertified
|
||||
)
|
||||
|
||||
type AuthRequestState int
|
||||
|
||||
const (
|
||||
AuthRequestStateUnspecified AuthRequestState = iota
|
||||
AuthRequestStateAdded
|
||||
AuthRequestStateCodeAdded
|
||||
AuthRequestStateCodeExchanged
|
||||
AuthRequestStateFailed
|
||||
AuthRequestStateSucceeded
|
||||
)
|
||||
|
||||
func NewAuthRequestFromType(requestType AuthRequestType) (*AuthRequest, error) {
|
||||
switch requestType {
|
||||
case AuthRequestTypeOIDC:
|
||||
|
23
internal/domain/oidc_error_reason.go
Normal file
23
internal/domain/oidc_error_reason.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package domain
|
||||
|
||||
type OIDCErrorReason int32
|
||||
|
||||
const (
|
||||
OIDCErrorReasonUnspecified OIDCErrorReason = iota
|
||||
OIDCErrorReasonInvalidRequest
|
||||
OIDCErrorReasonUnauthorizedClient
|
||||
OIDCErrorReasonAccessDenied
|
||||
OIDCErrorReasonUnsupportedResponseType
|
||||
OIDCErrorReasonInvalidScope
|
||||
OIDCErrorReasonServerError
|
||||
OIDCErrorReasonTemporaryUnavailable
|
||||
OIDCErrorReasonInteractionRequired
|
||||
OIDCErrorReasonLoginRequired
|
||||
OIDCErrorReasonAccountSelectionRequired
|
||||
OIDCErrorReasonConsentRequired
|
||||
OIDCErrorReasonInvalidRequestURI
|
||||
OIDCErrorReasonInvalidRequestObject
|
||||
OIDCErrorReasonRequestNotSupported
|
||||
OIDCErrorReasonRequestURINotSupported
|
||||
OIDCErrorReasonRegistrationNotSupported
|
||||
)
|
9
internal/domain/oidc_session.go
Normal file
9
internal/domain/oidc_session.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package domain
|
||||
|
||||
type OIDCSessionState int32
|
||||
|
||||
const (
|
||||
OIDCSessionStateUnspecified OIDCSessionState = iota
|
||||
OIDCSessionStateActive
|
||||
OIDCSessionStateTerminated
|
||||
)
|
Reference in New Issue
Block a user