azureauth

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationURITenantID

func AuthorizationURITenantID(url *url.URL) (string, error)

AuthorizationURITenantID returns the tenant ID portion of the given URL, which is expected to have come from DiscoverAuthorizationURI.

func DiscoverAuthorizationURI

func DiscoverAuthorizationURI(client subscriptions.Client, subscriptionID string) (*url.URL, error)

DiscoverAuthorizationID returns the OAuth authorization URI for the given subscription ID. This can be used to determine the AD tenant ID.

func InteractiveCreateServicePrincipal

func InteractiveCreateServicePrincipal(
	stderr io.Writer,
	sender autorest.Sender,
	requestInspector autorest.PrepareDecorator,
	resourceManagerEndpoint string,
	graphEndpoint string,
	subscriptionId string,
	clock clock.Clock,
	newUUID func() (utils.UUID, error),
) (appId, password string, _ error)

InteractiveCreateServicePrincipal interactively creates service principals for a subscription.

func OAuthConfig

func OAuthConfig(
	client subscriptions.Client,
	resourceManagerEndpoint string,
	subscriptionId string,
) (*azure.OAuthConfig, string, error)

OAuthConfig returns an azure.OAuthConfig based on the given resource manager endpoint and subscription ID. This will make a request to the resource manager API to discover the Active Directory tenant ID.

func TokenResource

func TokenResource(uri string) string

TokenResource returns a resource value suitable for auth tokens, based on an endpoint URI.

Types

type InteractiveCreateServicePrincipalFunc

type InteractiveCreateServicePrincipalFunc func(
	stderr io.Writer,
	sender autorest.Sender,
	requestInspector autorest.PrepareDecorator,
	resourceManagerEndpoint string,
	graphEndpoint string,
	subscriptionId string,
	clock clock.Clock,
	newUUID func() (utils.UUID, error),
) (appId, password string, _ error)

InteractiveCreateServicePrincipalFunc is a function type for interactively creating service principals for a subscription.

Jump to

Keyboard shortcuts

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