package wstrust

import "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust"

Package wstrust provides a client for communicating with a WSTrust (https://en.wikipedia.org/wiki/WS-Trust#:~:text=WS%2DTrust%20is%20a%20WS,in%20a%20secure%20message%20exchange.) for the purposes of extracting metadata from the service. This data can be used to acquire tokens using the accesstokens.Client.GetAccessTokenFromSamlGrant() call.

Index

Constants

const (
	SoapActionDefault = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
)

Types

type Client

type Client struct {
	// Comm provides the HTTP transport client.
	Comm xmlCaller
}

Client represents the REST calls to get tokens from token generator backends.

func (Client) Mex

func (c Client) Mex(ctx context.Context, federationMetadataURL string) (defs.MexDocument, error)

Mex provides metadata about a wstrust service.

func (Client) SAMLTokenInfo

func (c Client) SAMLTokenInfo(ctx context.Context, authParameters authority.AuthParams, cloudAudienceURN string, endpoint defs.Endpoint) (SamlTokenInfo, error)

SAMLTokenInfo provides SAML information that is used to generate a SAML token.

type SamlTokenInfo

type SamlTokenInfo struct {
	AssertionType string // Should be either constants SAMLV1Grant or SAMLV2Grant.
	Assertion     string
}

Source Files

wstrust.go

Directories

PathSynopsis
apps/internal/oauth/ops/wstrust/defs
Version
v1.4.2 (latest)
Published
Mar 26, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
2 days ago

Tools for package owners.