bearer

package
v1.0.59 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenResponse

type TokenResponse struct {
	T string `json:"token"`
	E int    `json:"expires_in"`
}

TokenResponse implementation for Bearer authentication

func RequestToken

func RequestToken(realm, service, repoPath, username, password string) (*TokenResponse, error)

RequestToken requests Bearer token from authentication service

func (TokenResponse) AuthHeader

func (tr TokenResponse) AuthHeader() string

AuthHeader returns contents of the Authorization HTTP header

func (TokenResponse) ExpiresIn

func (tr TokenResponse) ExpiresIn() int

ExpiresIn token lifetime in seconds

func (TokenResponse) Method

func (tr TokenResponse) Method() string

Method is set to "Bearer"

func (TokenResponse) Token

func (tr TokenResponse) Token() string

Token Bearer token

Jump to

Keyboard shortcuts

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