uaaapi

package
v0.0.0-...-ca399ba Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerToken

type BearerToken string

A BearerToken is a string that can be set in a HTTP header as proof of the token

type Generator

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

Generator defines the generation of tokens

func (*Generator) GetToken

func (generator *Generator) GetToken() (BearerToken, error)

GetToken obtains the token from the generator

type GetTokenInterface

type GetTokenInterface interface {
	GetToken() (BearerToken, error)
}

GetTokenInterface is the interface used to obtain token from uaa api

func NewTokenGenerator

func NewTokenGenerator(tokenURL, clientID, clientSecret string, client httpclient.HTTPClient, logger lager.Logger) GetTokenInterface

NewTokenGenerator creates and returns a TokenGenerator

type Token

type Token struct {
	AccessToken string `json:"access_token"`
	ExpireTime  int    `json:"expires_in"`
}

Token defines auth token basic struct

Jump to

Keyboard shortcuts

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