authenticator

package
v0.0.0-...-0fce7b6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOption

type AuthOption struct {
	AuthURL         string
	ProjectDomainId string
	UserDomainId    string
	Username        string
	Password        string
	Project_name    string
	TlsCfg          *tls.Config
}

type Catalog

type Catalog struct {
	Endpoints []struct {
		ID        string `json:"id"`
		Interface string `json:"interface"`
		RegionID  string `json:"region_id"`
		URL       string `json:"url"`
		Region    string `json:"region"`
	} `json:"endpoints"`
	ID   string `json:"id"`
	Type string `json:"type"`
	Name string `json:"name"`
}

type CreateTokenAPI

type CreateTokenAPI struct {
	Path     string
	Method   string
	Header   map[string]string
	Request  CreateTokenRequest
	Response CreateTokenResponse
}

type CreateTokenRequest

type CreateTokenRequest struct {
	Auth struct {
		Identity struct {
			Methods  []string `json:"methods"`
			Password struct {
				User struct {
					Name   string `json:"name"`
					Domain struct {
						ID string `json:"id"`
					} `json:"domain"`
					Password string `json:"password"`
				} `json:"user"`
			} `json:"password"`
		} `json:"identity"`
		Scope struct {
			Project struct {
				Name   string `json:"name"`
				Domain struct {
					ID string `json:"id"`
				} `json:"domain"`
			} `json:"project"`
		} `json:"scope"`
	} `json:"auth"`
}

type CreateTokenResponse

type CreateTokenResponse struct {
	Token struct {
		Methods []string `json:"methods"`
		User    struct {
			Domain struct {
				ID   string `json:"id"`
				Name string `json:"name"`
			} `json:"domain"`
			ID                string      `json:"id"`
			Name              string      `json:"name"`
			PasswordExpiresAt interface{} `json:"password_expires_at"`
		} `json:"user"`
		AuditIds  []string  `json:"audit_ids"`
		ExpiresAt time.Time `json:"expires_at"`
		IssuedAt  time.Time `json:"issued_at"`
		Project   struct {
			Domain struct {
				ID   string `json:"id"`
				Name string `json:"name"`
			} `json:"domain"`
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"project"`
		IsDomain bool `json:"is_domain"`
		Roles    []struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"roles"`
		Catalog []Catalog
	}
}

type ProviderClient

type ProviderClient struct {
	Token       string
	UserID      string
	UserName    string
	ProjectID   string
	ProjectName string
	Catalog     []Catalog

	TlsCfg *tls.Config
	// contains filtered or unexported fields
}

func AuthenticatedClient

func AuthenticatedClient(options AuthOption) (*ProviderClient, error)

Jump to

Keyboard shortcuts

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