client

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v1.6.0

func Parse(validationCrt []byte, tokenString string) (*jwt.Token, error)

Types

type Client

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

func New

func New(serverURL string) *Client

func (*Client) Login

func (c *Client) Login(username, password string) (result LoginResult, err error)

func (*Client) RefreshValidationCertificate

func (c *Client) RefreshValidationCertificate() (err error)

func (*Client) Validate

func (c *Client) Validate(tokenString string) (isValid bool, err error)

type LoginResult

type LoginResult struct {
	Token  string           `json:"token"`
	Claims *json.RawMessage `json:"claims"`
}

Jump to

Keyboard shortcuts

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