msi

package
v0.0.0-...-9858bdd Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 7 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsiProvider

func NewMsiProvider(client httputil.HttpClient) provider

Types

type Msi

type Msi struct {
	AccessToken  string `json:"access_token"`
	ClientID     string `json:"client_id"`
	ExpiresIn    string `json:"expires_in"`
	ExpiresOn    string `json:"expires_on"` // expressed in seconds from epoch
	ExtExpiresIn string `json:"ext_expires_in"`
	NotBefore    string `json:"not_before"`
	Resource     string `json:"resource"`
	TokenType    string `json:"token_type"`
}

func (*Msi) GetExpiryTime

func (msi *Msi) GetExpiryTime() (time.Time, error)

func (*Msi) GetJson

func (msi *Msi) GetJson() (string, error)

func (*Msi) IsMsiTokenExpired

func (msi *Msi) IsMsiTokenExpired() (bool, error)

check expiry of MSI token based on time

type MsiProvider

type MsiProvider interface {
	GetMsi() (Msi, error)
	GetMsiForResource(targetResource string) (Msi, error)
	GetMsiUsingClientId(clientId string, targetResource string) (Msi, error)
	GetMsiUsingObjectId(objectId string, targetResource string) (Msi, error)
}

Jump to

Keyboard shortcuts

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