uaa

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client used to communicate with BOSH

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient returns a new client

func (*Client) DoRequest

func (c *Client) DoRequest(r *request) (*http.Response, error)

func (*Client) GetInfo

func (c *Client) GetInfo() (info Info, err error)

GetInfo returns UAA Info

func (*Client) GetPasswordToken

func (c *Client) GetPasswordToken(username, password string) (tokenResp TokenResp, err error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string) *request

NewRequest is used to create a new request

type Config

type Config struct {
	ClientID          string
	ClientSecret      string
	Address           string
	HttpClient        *http.Client
	SkipSslValidation bool
}

Config is used to configure the creation of a client

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig configuration for client

type Info

type Info struct {
	App struct {
		Version string `json:"version"`
	} `json:"app"`
	ZoneName string `json:"zone_name"`
	Links    struct {
		UAA      string `json:"uaa"`
		Password string `json:"passwd"`
		Login    string `json:"login"`
		Register string `json:"register"`
	}
}

type TokenResp

type TokenResp struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	Scope        string `json:"scope"`
	JTI          string `json:"jti"`
}

Jump to

Keyboard shortcuts

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