ops

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ops provides operations to various backend services using REST clients.

The REST type provides several clients that can be used to communicate to backends. Usage is simple:

rest := ops.New()

// Creates an authority client and calls the UserRealm() method.
userRealm, err := rest.Authority().UserRealm(ctx, authParameters)
if err != nil {
	// Do something
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient = comm.HTTPClient

HTTPClient represents an HTTP client. It's usually an *http.Client from the standard library.

type REST

type REST struct {
	// contains filtered or unexported fields
}

REST provides REST clients for communicating with various backends used by MSAL.

func New

func New(httpClient HTTPClient) *REST

New is the constructor for REST.

func (*REST) AccessTokens

func (r *REST) AccessTokens() accesstokens.Client

AccessTokens returns a client that can be used to get various access tokens for authorization purposes.

func (*REST) Authority

func (r *REST) Authority() authority.Client

Authority returns a client for querying information about various authorities.

func (*REST) WSTrust

func (r *REST) WSTrust() wstrust.Client

WSTrust provides access to various metadata in a WSTrust service. This data can be used to gain tokens based on SAML data using the client provided by AccessTokens().

Directories

Path Synopsis
Package accesstokens exposes a REST client for querying backend systems to get various types of access tokens (oauth) for use in authentication.
Package accesstokens exposes a REST client for querying backend systems to get various types of access tokens (oauth) for use in authentication.
internal
comm
Package comm provides helpers for communicating with HTTP backends.
Package comm provides helpers for communicating with HTTP backends.
grant
Package grant holds types of grants issued by authorization services.
Package grant holds types of grants issued by authorization services.
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.
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.

Jump to

Keyboard shortcuts

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