package authentication

import "github.com/vmware/govmomi/vapi/authentication"

Index

Types

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding authentication related methods.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) Issue

func (c *Manager) Issue(ctx context.Context, token TokenIssueSpec) (*TokenInfo, error)

type TokenInfo

type TokenInfo struct {
	AccessToken     string `json:"access_token"`
	TokenType       string `json:"token_type"`
	ExpiresIn       int    `json:"expires_in,omitempty"`
	IssuedTokenType string `json:"issued_token_type,omitempty"`
	RefreshToken    string `json:"refresh_token,omitempty"`
	Scope           string `json:"scope,omitempty"`
}

type TokenIssueSpec

type TokenIssueSpec struct {
	SubjectToken       string `json:"subject_token"`
	SubjectTokenType   string `json:"subject_token_type"`
	GrantType          string `json:"grant_type"`
	ActorToken         string `json:"actor_token,omitempty"`
	ActorTokenType     string `json:"actor_token_type,omitempty"`
	RequestedTokenType string `json:"requested_token_type,omitempty"`
	Resource           string `json:"resource,omitempty"`
	Scope              string `json:"scope,omitempty"`
	Audience           string `json:"audience,omitempty"`
}

Source Files

authentication.go

Version
v0.51.0 (latest)
Published
May 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
2 weeks ago

Tools for package owners.