actionsoidc

package
v0.0.0-...-19a35ad Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironmentVariable

func GetEnvironmentVariable(e string) (string, error)

func QuitOnErr

func QuitOnErr(e error)

Types

type ActionsJWT

type ActionsJWT struct {
	Count       int
	Value       string
	ParsedToken *jwt.Token
}

func (*ActionsJWT) Parse

func (j *ActionsJWT) Parse()

func (*ActionsJWT) PrettyPrintClaims

func (j *ActionsJWT) PrettyPrintClaims() string

type ActionsOIDCClient

type ActionsOIDCClient struct {
	// the url to fetch the jwt
	TokenRequestURL string
	// the audience for the jwt
	Audience string
	// the token used to retrieve the jwt, not the jwt
	RequestToken string
}

func DefaultOIDCClient

func DefaultOIDCClient(audience string) ActionsOIDCClient

func NewActionsOIDCClient

func NewActionsOIDCClient(tokenURL string, audience string, token string) (ActionsOIDCClient, error)

construct a new ActionsOIDCClient

func (*ActionsOIDCClient) BuildTokenURL

func (c *ActionsOIDCClient) BuildTokenURL() error

this function uses an ActionsOIDCClient to build the complete URL to request a jwt

func (*ActionsOIDCClient) GetJWT

func (c *ActionsOIDCClient) GetJWT() (*ActionsJWT, error)

retrieve an actions oidc token

Jump to

Keyboard shortcuts

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