samlext

package
v0.61.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySignedHTTPRedirectQuery

func VerifySignedHTTPRedirectQuery(kind string, rawQuery string, sigAlg string, signature []byte, pubKey crypto.PublicKey) error

VerifySignedHTTPRedirectQuery implements validation for signed SAML HTTP redirect binding parameters provides via URL query.

Types

type IdpLogoutRequest

type IdpLogoutRequest struct {
	HTTPRequest *http.Request

	Binding       string
	RequestBuffer []byte
	Request       *saml.LogoutRequest
	Now           time.Time

	RelayState string
	SigAlg     *string
	Signature  []byte
}

IdpLogoutRequest is used by IdentityProvider to handle a single logout request.

func NewIdpLogoutRequest

func NewIdpLogoutRequest(r *http.Request) (*IdpLogoutRequest, error)

func (*IdpLogoutRequest) Validate

func (req *IdpLogoutRequest) Validate() error

Validate checks that the authentication request is valid and assigns the LogoutRequest and Metadata properties. Returns a non-nil error if the request is not valid.

func (*IdpLogoutRequest) VerifySignature

func (req *IdpLogoutRequest) VerifySignature(pubKey crypto.PublicKey) error

VerifySignature verifies the associated IdpLogoutRequest data with the associated Signature using the provided public key.

type IdpLogoutResponse

type IdpLogoutResponse struct {
	HTTPRequest *http.Request

	Binding        string
	ResponseBuffer []byte
	Response       *saml.LogoutResponse
	Now            time.Time

	RelayState string
	SigAlg     *string
	Signature  []byte
}

IdpLogoutResponse is used by IdentityProvider to handle a single logout response callbacks.

func NewIdpLogoutResponse

func NewIdpLogoutResponse(r *http.Request) (*IdpLogoutResponse, error)

func (*IdpLogoutResponse) Validate

func (res *IdpLogoutResponse) Validate() error

Validate checks that the associated response is valid and assigns the LogoutResponse and Metadata properties. Returns a non-nil error if the request is not valid.

func (*IdpLogoutResponse) VerifySignature

func (res *IdpLogoutResponse) VerifySignature(pubKey crypto.PublicKey) error

VerifySignature verifies the associated IdpLogoutResponse data with the associated Signature using the provided public key.

type LogoutRequest

type LogoutRequest struct {
	*saml.LogoutRequest
}

func (*LogoutRequest) Redirect

func (req *LogoutRequest) Redirect(relayState string) *url.URL

Redirect returns a URL suitable for using the redirect binding with the response.

type LogoutResponse

type LogoutResponse struct {
	*saml.LogoutResponse
}

func MakeLogoutResponse

func MakeLogoutResponse(sp *saml.ServiceProvider, req *saml.LogoutRequest, status *saml.Status, binding string) (*LogoutResponse, error)

func (*LogoutResponse) Redirect

func (res *LogoutResponse) Redirect(relayState string) *url.URL

Redirect returns a URL suitable for using the redirect binding with the response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL