internal

package
v0.0.0-...-4377939 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextClient

func ContextClient(ctx context.Context) *http.Client

func ExtractExp

func ExtractExp(c jwt.Claims) int64

func ParseJwt

func ParseJwt(_jwt string) (*jwt.Token, error)

Types

type ContextKey

type ContextKey struct{}
var HTTPClient ContextKey

type RetrieveError

type RetrieveError struct {
	Response *http.Response
	Body     []byte
}

func (*RetrieveError) Error

func (r *RetrieveError) Error() string

type StrapiRole

type StrapiRole struct {
	Id          int32
	Name        string
	Description string
	Type        string
}

type Token

type Token struct {
	Jwt    string
	User   UserProfile
	Raw    interface{}
	Expiry time.Time
}

func RetrieveToken

func RetrieveToken(ctx context.Context, identifier, password, authUrl string, v url.Values) (*Token, error)

type UserProfile

type UserProfile struct {
	Username  string
	Id        int32
	Email     string
	Provider  string
	Confirmed bool
	Blocked   interface{}
	Role      StrapiRole
	CreatedAt string
	UpdatedAt string
}

Jump to

Keyboard shortcuts

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