auth

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Token

func Token(ctx context.Context, privateKey []byte, scopes ...string) (*oauth2.Token, error)

Token returns an oauth2.Token given the privateKey and scopes.

func WriteTokenSecret

func WriteTokenSecret(ctx context.Context, core corev1.CoreV1Interface, oauthSecret *v1.Secret) error

WriteTokenSecret will, given a Kubernetes core object and a *v1.Secret (oauthSecret) which contains the service account information, write a new secret with the opaque token that can be used with the Kubernetes service catalog. oauthSecret should contain the fields: - "key": which has the Google service account JWT information - "secretName": which is the desired name of the secret we will create here - "secretNamespace: the desired namespace of the secret this function creates - "scopes": the scopes of the access token

Types

type GoogleOAuthSecret

type GoogleOAuthSecret struct {
	// contains filtered or unexported fields
}

GoogleOAuthSecret has the information that we expect to parse from the Secret which we will use to generate an access token.

Jump to

Keyboard shortcuts

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