jwt

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VC_SVCACCOUNT_USER_PATH = "/etc/nsx-ujo/vc/username"
	VC_SVCACCOUNT_PWD_PATH  = "/etc/nsx-ujo/vc/password"
)

Variables

This section is empty.

Functions

func NewTokenProvider

func NewTokenProvider(vcEndpoint string, port int, ssoDomain, user, password string, caCert []byte, insecure bool) (auth.TokenProvider, error)

Types

type JWTCache

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

JWTCache ...

func NewJWTCache

func NewJWTCache(tesClient *TESClient, freshInterval time.Duration) *JWTCache

NewJWTCache ...

func (*JWTCache) GetJWT

func (cache *JWTCache) GetJWT(refreshToken bool) (string, error)

type JWTTokenProvider

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

func (*JWTTokenProvider) GetToken

func (provider *JWTTokenProvider) GetToken(refreshToken bool) (string, error)

func (*JWTTokenProvider) HeaderValue

func (provider *JWTTokenProvider) HeaderValue(token string) string

type TESClient

type TESClient struct {
	*VCClient
}

TESClient requests Token Exchange Service (TES) to issue JWT in exchange for SAML token.

func NewTESClient

func NewTESClient(hostname string, port int, ssoDomain string, username, password string, caCertPem []byte, insecureSkipVerify bool) (*TESClient, error)

NewTESClient creates a TESClient object.

func (*TESClient) ExchangeJWT

func (client *TESClient) ExchangeJWT(samlToken string, useOldAudience bool) (string, error)

ExchangeJWT requests TES to issue JWT in exchange for the specified SAML token.

type VCClient

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

VCClient tracks a client session token.

func NewVCClient

func NewVCClient(hostname string, port int, ssoDomain string, userName, password string, caCertPem []byte, insecureSkipVerify bool) (*VCClient, error)

NewVCClient creates a new logged in VC client with vapi session.

func (*VCClient) HandleRequest

func (client *VCClient) HandleRequest(urlPath string, data []byte, responseData interface{}) error

HandleRequest sends a POST request

Jump to

Keyboard shortcuts

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