config

package
v0.0.0-...-8d41f68 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username     string          `yaml:"username"`
	TenantID     string          `yaml:"tenantID"`
	ClientID     string          `yaml:"clientID"`
	ClientSecret string          `yaml:"clientSecret"`
	Scopes       []string        `yaml:"scopes"`
	Redirect     *RedirectConfig `yaml:"redirect"`
}

Config is the configuration for the client OAUTH2 system

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from the default configuration file.

func (*Config) OAuth2

func (cfg *Config) OAuth2() *oauth2.Config

OAuth2 returns the OAuth2 config from this configuration.

type RedirectConfig

type RedirectConfig struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Path string `yaml:"path"`
}

RedirectConfig describes the OAUTH2 delegationr redirect setup (from client config on Microsoft)

func (*RedirectConfig) URL

func (rc *RedirectConfig) URL() string

URL returns the RedirectURL.

Jump to

Keyboard shortcuts

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