Documentation ¶
Index ¶
Constants ¶
const ( ProviderUnknown accountProvider = 0 // Unknown Provider ProviderM365 accountProvider = 1 // M365 )
const ( // M365 config AccountProviderTypeKey = "account_provider" AzureTenantIDKey = "azure_tenantid" AzureClientID = "azure_client_id" AzureSecret = "azure_secret" )
const (
AzureTenantID = "AZURE_TENANT_ID"
)
config exported name consts
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
Account defines an account provider, along with any credentials and identifiers required to set up or communicate with that provider.
func NewAccount ¶
NewAccount aggregates all the supplied configurations into a single configuration
func (Account) GetAccountConfigHash ¶
func (Account) ID ¶
ID returns the primary tenant ID held by its configuration. Ex: if the account uses an M365 provider, the M365 tenant ID is returned. If the account contains no ID info, returns an empty string.
func (Account) M365Config ¶
func (a Account) M365Config() (M365Config, error)
M365Config retrieves the M365Config details from the Account config.
type M365Config ¶
type M365Config struct { credentials.M365 // requires: ClientID, ClientSecret AzureTenantID string }
func (M365Config) StringConfig ¶
func (c M365Config) StringConfig() (map[string]string, error)
StringConfig transforms a m365Config struct into a plain map[string]string. All values in the original struct which serialize into the map are expected to be strings.