iam

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfiguration = errors.New("invalid HTTP IAM configuration")

ErrInvalidConfiguration generated when Config has missing or invalid data

Functions

func Configuration

func Configuration(c Config) httpcli.ConfigMapOption

Configuration returns a functional option for an httpcli.ConfigMap

func Doer

func Doer(client *http.Client, config Config) httpcli.Doer

Doer wraps an HTTP transactor given an IAM configuration

func Register

func Register()

Register registers a DoerFactory for IAM (JWT-based) authentication

Types

type Config

type Config struct {
	ID            string `json:"uid"`            // ID
	PrivateKey    string `json:"private_key"`    // PrivateKey
	LoginEndpoint string `json:"login_endpoint"` // LoginEndpoint
}

Config captures the configuration that allows mesos-dns to authenticate against some IAM endpoint.

func LoadFromFile

func LoadFromFile(filename string) (config Config, err error)

LoadFromFile reads an IAM Config from a file (JSON format) on the local filesystem.

Jump to

Keyboard shortcuts

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