microsoft

package
v0.0.0-...-43a01a0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package microsoft provides authentication strategies using Microsoft.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID             string          `json:"clientID"`
	ClientSecret         string          `json:"clientSecret"`
	RedirectURI          string          `json:"redirectURI"`
	Tenant               string          `json:"tenant"`
	OnlySecurityGroups   bool            `json:"onlySecurityGroups"`
	Groups               []string        `json:"groups"`
	GroupNameFormat      GroupNameFormat `json:"groupNameFormat"`
	UseGroupsAsWhitelist bool            `json:"useGroupsAsWhitelist"`
	EmailToLowercase     bool            `json:"emailToLowercase"`

	// PromptType is used for the prompt query parameter.
	// For valid values, see https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code.
	PromptType string `json:"promptType"`
	DomainHint string `json:"domainHint"`

	Scopes []string `json:"scopes"` // defaults to scopeUser (user.read)
}

Config holds configuration options for microsoft logins.

func (*Config) Open

func (c *Config) Open(id string, logger log.Logger) (connector.Connector, error)

Open returns a strategy for logging in through Microsoft.

type GroupNameFormat

type GroupNameFormat string

GroupNameFormat represents the format of the group identifier we use type of string instead of int because it's easier to marshall/unmarshall

const (
	GroupID   GroupNameFormat = "id"
	GroupName GroupNameFormat = "name"
)

Possible values for GroupNameFormat

Jump to

Keyboard shortcuts

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