Documentation ¶
Index ¶
- Constants
- Variables
- func RenderSAMLEntityID(cfg config.SAMLEnvironmentConfig, appID string) string
- type BindingHTTPPostWriter
- type BindingHTTPRedirectWriter
- type IDPSessionProvider
- type OfflineGrantService
- type SAMLElementSigned
- type SAMLElementToSign
- type SAMLEndpoints
- type SAMLService
- type SAMLUserInfoProvider
- type SLOService
- type Service
- func (s *Service) ConstructSignedQueryParameters(relayState string, el *SAMLElementToSign) (url.Values, error)
- func (s *Service) IdpEntityID() string
- func (s *Service) IdpMetadata(serviceProviderId string) (*samlprotocol.Metadata, error)
- func (s *Service) IssueLoginSuccessResponse(ctx context.Context, callbackURL string, serviceProviderId string, ...) (*samlprotocol.Response, error)
- func (s *Service) IssueLogoutRequest(ctx context.Context, sp *config.SAMLServiceProviderConfig, ...) (*samlprotocol.LogoutRequest, error)
- func (s *Service) IssueLogoutResponse(callbackURL string, inResponseToLogoutRequest *samlprotocol.LogoutRequest, ...) (*samlprotocol.LogoutResponse, error)
- func (s *Service) ValidateAuthnRequest(serviceProviderId string, authnRequest *samlprotocol.AuthnRequest) error
- func (s *Service) VerifyEmbeddedSignature(sp *config.SAMLServiceProviderConfig, samlElementXML string) error
- func (s *Service) VerifyExternalSignature(sp *config.SAMLServiceProviderConfig, el *SAMLElementSigned, sigAlg string, ...) error
Constants ¶
View Source
const MaxAuthnRequestValidDuration = duration.Short
View Source
const MetadataValidDuration = time.Hour * 24
Variables ¶
Functions ¶
func RenderSAMLEntityID ¶
func RenderSAMLEntityID(cfg config.SAMLEnvironmentConfig, appID string) string
Types ¶
type BindingHTTPPostWriter ¶
type IDPSessionProvider ¶
type IDPSessionProvider interface { AddSAMLServiceProviderParticipant( ctx context.Context, session *idpsession.IDPSession, serviceProviderID string, ) (*idpsession.IDPSession, error) }
type OfflineGrantService ¶
type OfflineGrantService interface { AddSAMLServiceProviderParticipant( ctx context.Context, grant *oauth.OfflineGrant, serviceProviderID string, ) (*oauth.OfflineGrant, error) }
type SAMLElementSigned ¶
type SAMLElementToSign ¶
type SAMLEndpoints ¶
type SAMLService ¶
type SAMLService interface { IssueLogoutRequest( ctx context.Context, sp *config.SAMLServiceProviderConfig, sloSession *samlslosession.SAMLSLOSession, ) (*samlprotocol.LogoutRequest, error) }
type SAMLUserInfoProvider ¶
type SLOService ¶
type SLOService struct { SAMLService SAMLService BindingHTTPPostWriter BindingHTTPPostWriter BindingHTTPRedirectWriter BindingHTTPRedirectWriter }
func (*SLOService) SendSLORequest ¶
func (s *SLOService) SendSLORequest( ctx context.Context, rw http.ResponseWriter, r *http.Request, sloSession *samlslosession.SAMLSLOSession, sp *config.SAMLServiceProviderConfig, ) error
type Service ¶
type Service struct { Clock clock.Clock AppID config.AppID SAMLEnvironmentConfig config.SAMLEnvironmentConfig SAMLConfig *config.SAMLConfig SAMLIdpSigningMaterials *config.SAMLIdpSigningMaterials SAMLSpSigningMaterials *config.SAMLSpSigningMaterials Endpoints SAMLEndpoints UserInfoProvider SAMLUserInfoProvider IDPSessionProvider IDPSessionProvider OfflineGrantSessionProvider OfflineGrantService }
func (*Service) ConstructSignedQueryParameters ¶
func (*Service) IdpEntityID ¶
func (*Service) IdpMetadata ¶
func (s *Service) IdpMetadata(serviceProviderId string) (*samlprotocol.Metadata, error)
func (*Service) IssueLoginSuccessResponse ¶
func (s *Service) IssueLoginSuccessResponse( ctx context.Context, callbackURL string, serviceProviderId string, authInfo authenticationinfo.T, inResponseToAuthnRequest *samlprotocol.AuthnRequest, ) (*samlprotocol.Response, error)
func (*Service) IssueLogoutRequest ¶
func (s *Service) IssueLogoutRequest( ctx context.Context, sp *config.SAMLServiceProviderConfig, sloSession *samlslosession.SAMLSLOSession, ) (*samlprotocol.LogoutRequest, error)
func (*Service) IssueLogoutResponse ¶
func (s *Service) IssueLogoutResponse( callbackURL string, inResponseToLogoutRequest *samlprotocol.LogoutRequest, isPartialLogout bool, ) (*samlprotocol.LogoutResponse, error)
func (*Service) ValidateAuthnRequest ¶
func (s *Service) ValidateAuthnRequest(serviceProviderId string, authnRequest *samlprotocol.AuthnRequest) error
Validate the AuthnRequest This method does not verify the signature
func (*Service) VerifyEmbeddedSignature ¶
func (s *Service) VerifyEmbeddedSignature( sp *config.SAMLServiceProviderConfig, samlElementXML string) error
func (*Service) VerifyExternalSignature ¶
func (s *Service) VerifyExternalSignature( sp *config.SAMLServiceProviderConfig, el *SAMLElementSigned, sigAlg string, relayState string, signature string) error
Click to show internal directories.
Click to hide internal directories.