maskinporten

package
v0.0.0-...-47a8c80 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	PrivateKey    string `yaml:"privateKey"`
	PublicKey     string `yaml:"publicKey"`
	TokenEndpoint string `yaml:"tokenEndpoint"`
	Scope         string `yaml:"scope"`
	Audience      string `yaml:"aud"`
	Issuer        string `yaml:"iss"`
	// contains filtered or unexported fields
}

Handler - provides access to maskinporten functionality

func (*Handler) CreateAccessToken

func (h *Handler) CreateAccessToken() (tokenRes TokenResponse, err error)

CreateAccessToken - creates an Maskinporten access token

func (*Handler) Init

func (h *Handler) Init() (err error)

Init - initializes the handler. Reads and parses priv and pub key

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	Scope       string `json:"scope"`
}

TokenResponse is the form of the response when fetching an access token from ID-porten

Jump to

Keyboard shortcuts

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