package shared

import "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared"

Index

Constants

const (
	// CacheKeySeparator is used in creating the keys of the cache.
	CacheKeySeparator = "-"
)

Variables

var DefaultClient = &http.Client{}

DefaultClient is our default shared HTTP client.

Types

type Account

type Account struct {
	HomeAccountID     string `json:"home_account_id,omitempty"`
	Environment       string `json:"environment,omitempty"`
	Realm             string `json:"realm,omitempty"`
	LocalAccountID    string `json:"local_account_id,omitempty"`
	AuthorityType     string `json:"authority_type,omitempty"`
	PreferredUsername string `json:"username,omitempty"`
	GivenName         string `json:"given_name,omitempty"`
	FamilyName        string `json:"family_name,omitempty"`
	MiddleName        string `json:"middle_name,omitempty"`
	Name              string `json:"name,omitempty"`
	AlternativeID     string `json:"alternative_account_id,omitempty"`
	RawClientInfo     string `json:"client_info,omitempty"`
	UserAssertionHash string `json:"user_assertion_hash,omitempty"`

	AdditionalFields map[string]interface{}
}

func NewAccount

func NewAccount(homeAccountID, env, realm, localAccountID, authorityType, username string) Account

NewAccount creates an account.

func (Account) IsZero

func (acc Account) IsZero() bool

IsZero checks the zero value of account.

func (Account) Key

func (acc Account) Key() string

Key creates the key for storing accounts in the cache.

Source Files

shared.go

Version
v1.4.0
Published
Feb 14, 2025
Platform
darwin/amd64
Imports
3 packages
Last checked
2 weeks ago

Tools for package owners.