samlidp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequestForm

func BadRequestForm(w http.ResponseWriter, r *http.Request, message string, file string)

BadRequestForm shows bad request message if SAML request is not valid

func ErrorForm

func ErrorForm(w http.ResponseWriter, r *http.Request, message string, statusCode int, file string)

ErrorForm shows error message if something went wrong.

func GetSPMetadata

func GetSPMetadata(r io.Reader) (*saml.EntityDescriptor, error)

GetSPMetadata return EntityDescriptor

func LoginForm

func LoginForm(w http.ResponseWriter, r *http.Request, req *saml.IdpAuthnRequest, url string, message string, file string)

LoginForm produces a form which requests a email and password and directs the user back to the IDP authorize URL to restart the SAML login flow, this time establishing a session based on the credentials that were provided.

func MakeAssertion

func MakeAssertion(req *saml.IdpAuthnRequest, idp *saml.IdentityProvider, session *saml.Session) error

MakeAssertion creates the assersion that is returned to the Service Provider

func New

func New(cfg *config.Config) (*samlidp.Server, error)

New returns a new saml idp Server

func RandomBytes

func RandomBytes(n int) []byte

RandomBytes generates n random bytes

func ValidateSamlRequest

func ValidateSamlRequest(idp *saml.IdentityProvider, r *http.Request) (*saml.IdpAuthnRequest, error)

ValidateSamlRequest validates the SAML requst. If it is not valid error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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