tinysaml

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSAMLMetadata

func GenerateSAMLMetadata(issuer string, pubkeys []crypto.PublicKey) (string, error)

Generate XML metadata for the given issuer and public keys.

Types

type AssertionOptions

type AssertionOptions struct {
	Lifetime   time.Duration
	Attributes map[string][]string
}

type IdP

type IdP struct {
	EntityID     string
	NameIDFormat string
	Signer       crypto.Signer
	Cert         []byte
}

func NewIdP

func NewIdP(metadata *Metadata, signers ...crypto.Signer) (*IdP, error)

Create an IdP based on the provided metadata and one of the signers. Returns an error if none of the signers match any of the certificates in the metadata.

func (*IdP) GenerateAssertion

func (idp *IdP) GenerateAssertion(recipient string, subject string, options *AssertionOptions) (string, error)

type Metadata

type Metadata struct {
	EntityID     string
	Certs        []*x509.Certificate
	NameIDFormat string
}

func ParseMetadata

func ParseMetadata(data []byte) (*Metadata, error)

Parse metadata in XML format.

Directories

Path Synopsis
cmd
tinysaml-assert
Generate a SAML assertion (intended for testing)
Generate a SAML assertion (intended for testing)
tinysaml-aws
Assume an AWS role using a SAML IdP (intended for testing)
Assume an AWS role using a SAML IdP (intended for testing)
tinysaml-metadata
Generate the simplest possible metadata for a SAML Identity Provider
Generate the simplest possible metadata for a SAML Identity Provider
yubikey-aws
Assume an AWS role using a SAML IdP stored on a PIV token
Assume an AWS role using a SAML IdP stored on a PIV token

Jump to

Keyboard shortcuts

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