mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-10 12:24:03 +00:00
c3b97a91a2
# Which Problems Are Solved It is currently not possible to use SAML with the Session API. # How the Problems Are Solved Add SAML service, to get and resolve SAML requests. Add SAML session and SAML request aggregate, which can be linked to the Session to get back a SAMLResponse from the API directly. # Additional Changes Update of dependency zitadel/saml to provide all functionality for handling of SAML requests and responses. # Additional Context Closes #6053 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package domain
|
|
|
|
import (
|
|
"github.com/zitadel/saml/pkg/provider"
|
|
)
|
|
|
|
type SAMLErrorReason int32
|
|
|
|
const (
|
|
SAMLErrorReasonUnspecified SAMLErrorReason = iota
|
|
SAMLErrorReasonVersionMissmatch
|
|
SAMLErrorReasonAuthNFailed
|
|
SAMLErrorReasonInvalidAttrNameOrValue
|
|
SAMLErrorReasonInvalidNameIDPolicy
|
|
SAMLErrorReasonRequestDenied
|
|
SAMLErrorReasonRequestUnsupported
|
|
SAMLErrorReasonUnsupportedBinding
|
|
)
|
|
|
|
func SAMLErrorReasonToString(reason SAMLErrorReason) string {
|
|
switch reason {
|
|
case SAMLErrorReasonUnspecified:
|
|
return "unspecified error"
|
|
case SAMLErrorReasonVersionMissmatch:
|
|
return provider.StatusCodeVersionMissmatch
|
|
case SAMLErrorReasonAuthNFailed:
|
|
return provider.StatusCodeAuthNFailed
|
|
case SAMLErrorReasonInvalidAttrNameOrValue:
|
|
return provider.StatusCodeInvalidAttrNameOrValue
|
|
case SAMLErrorReasonInvalidNameIDPolicy:
|
|
return provider.StatusCodeInvalidNameIDPolicy
|
|
case SAMLErrorReasonRequestDenied:
|
|
return provider.StatusCodeRequestDenied
|
|
case SAMLErrorReasonRequestUnsupported:
|
|
return provider.StatusCodeRequestUnsupported
|
|
case SAMLErrorReasonUnsupportedBinding:
|
|
return provider.StatusCodeUnsupportedBinding
|
|
default:
|
|
return "unspecified error"
|
|
}
|
|
}
|