client

package
v0.0.0-...-8784027 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Log       *logrus.Entry
	Config    *Config
	Client    *http.Client
	AuthToken *msgraph.AuthToken
}

Client contains internal MS Graph Client details

func NewClient

func NewClient(log *logrus.Entry) *Client

NewClient creates a new MS Graph Client with default configuration

func NewClientForConfig

func NewClientForConfig(config *Config, log *logrus.Entry) *Client

NewClientForConfig creates a new MS Graph Client with the specified configuration

func (*Client) GetAccessToken

func (c *Client) GetAccessToken() (*msgraph.AuthToken, error)

GetAccessToken leverages the Auth API to return an AuthToken that provides authenticated access to the MS Graph API

func (*Client) GetGroup

func (c *Client) GetGroup(groupID string) (*msgraph.Group, error)

GetGroup leverages the MS Graph API to return the AzureAD group specified by the group id

type Config

type Config struct {
	TenantID     string
	ClientID     string
	ClientSecret string
}

Config holds the configuration details required for the client

func NewConfigFromEnvironmentVariables

func NewConfigFromEnvironmentVariables() (*Config, error)

NewConfigFromEnvironmentVariables creates a config from environment variables

Jump to

Keyboard shortcuts

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