auth

package
v0.0.0-...-fd51218 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespace

func GetNamespace(space_id string) (namespace string)

Types

type Creds

type Creds struct {
	Status        int //200 is auth success
	Node          string
	Docker_id     string //docker resource id (e.g., exec id)
	Container     string
	Tls_override  bool   //Don't use tls to connect to this node
	Space_id      string //Bluemix space
	Reg_namespace string //Reg namespace
	Apikey        string
	Orguuid       string
	Userid        string
	Swarm_shard   bool
	Endpoint_type string // radiant, kraken, swarm etc.
	TLS_path      string
}

Creds struct returned to calling handler after authenticating with CCSAPI

func FileAuth

func FileAuth(r *http.Request) (creds Creds)

Use a file as authentication credentials store (mainly for trusted test SWARM tenants) BlueMix space id is passed in request header as X-Auth-Project-Id header and is used as search key into the file

func StubAuth

func StubAuth(r *http.Request) (creds Creds)

authentication stub for trusted SWARM tenants BlueMix space id is passed in request as X-Auth-Project-Id header

type GetCertResp

type GetCertResp struct {
	User_cert   string
	User_key    string
	Server_cert string
	Ca_cert     string
}

'/v3/tlskey' CCSAPI call response

func GetCert

func GetCert(r *http.Request, creds Creds) (status int, certs GetCertResp)

Editing GetCert to retrieve from local path.

Jump to

Keyboard shortcuts

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