auth

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tex

type Tex struct {
	TexHost string
}

implements the TokenExchanger interface

func (*Tex) ExchangeToken

func (t *Tex) ExchangeToken(identityToken string) (string, error)

Exchanges an identity token for an access token by calling the OAuth endpoint on the array

type TexResponse

type TexResponse struct {
	AccessToken     string `json:"access_token,omitempty"`
	IssuedTokenType string `json:"issued_token_type,omitempty"`
	TokenType       string `json:"token_type,omitempty"`
	ExpiresIn       uint32 `json:"expires_in,omitempty"`
}

TexResponse represents the response for the token exchange request.

type TokenConfig

type TokenConfig struct {
	Issuer   string
	ClientID string
	KeyID    string

	User string

	PrivateKey string
}

func (*TokenConfig) BuildToken

func (tc *TokenConfig) BuildToken() (string, error)

type TokenExchanger

type TokenExchanger interface {
	ExchangeToken(string) (string, error)
}

Jump to

Keyboard shortcuts

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