azureauth

package
v0.0.1-pre-2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	TenantID string
	ClientID string
	// contains filtered or unexported fields
}

func New

func New(options ...AuthOption) (*Auth, error)

func (*Auth) AccessToken

func (a *Auth) AccessToken() string

func (*Auth) AuthURL

func (a *Auth) AuthURL() string

func (*Auth) ExpiresIn

func (a *Auth) ExpiresIn() int

func (*Auth) IDToken

func (a *Auth) IDToken() string

func (*Auth) Login

func (a *Auth) Login() error

func (*Auth) RefreshToken

func (a *Auth) RefreshToken() string

func (*Auth) TokenType

func (a *Auth) TokenType() string

type AuthOption

type AuthOption func(*Auth)

func WithClientID

func WithClientID(clientID string) AuthOption

func WithTenantID

func WithTenantID(tenantID string) AuthOption

type DeviceCodeResponse

type DeviceCodeResponse struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURI string `json:"verification_uri"`
	ExpiresIn       int    `json:"expires_in"`
	Interval        int    `json:"interval"`
	Message         string `json:"message"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	IDToken      string `json:"id_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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