bearer

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 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 Token

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

Token implementation for Bearer authentication

func RequestToken

func RequestToken(username, password string, params map[string]string) (*Token, error)

RequestToken requests Bearer token from authentication service

func (Token) ExpiresIn

func (tk Token) ExpiresIn() int

ExpiresIn token lifetime in seconds

func (Token) Method

func (tk Token) Method() string

Method is set to "Bearer"

func (Token) String

func (tk Token) String() string

String form of Bearer token

Jump to

Keyboard shortcuts

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