samlext

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 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 added in v0.32.0

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 added in v0.32.0

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

func (*IdpLogoutResponse) Validate added in v0.32.0

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 added in v0.32.0

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 added in v0.32.0

type LogoutRequest struct {
	*saml.LogoutRequest
}

func (*LogoutRequest) Redirect added in v0.32.0

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

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

type LogoutResponse added in v0.32.0

type LogoutResponse struct {
	*saml.LogoutResponse
}

func MakeLogoutResponse added in v0.32.0

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

func (*LogoutResponse) Redirect added in v0.32.0

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