ims

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 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 Config

type Config struct {
	URL            string
	ClientID       string
	ClientSecret   string
	ServiceToken   string
	PrivateKeyPath string
	Organization   string
	Account        string
	Scopes         []string
	Metascopes     []string
	AccessToken    string
	Timeout        int
}

func (Config) AuthorizeJWTExchange

func (i Config) AuthorizeJWTExchange() (TokenInfo, error)

func (Config) AuthorizeService

func (i Config) AuthorizeService() (string, error)

* AuthorizeService : Login for the service to service IMS flow

func (Config) AuthorizeUser

func (i Config) AuthorizeUser() (string, error)

* AuthorizeUser uses the standard Oauth2 authorization code grant flow. The Oauth2 configuration is * taken from the Config struct.

func (Config) GetProfile

func (i Config) GetProfile() (string, error)

* GetProfile requests the user profile using an access token.

type TokenInfo

type TokenInfo struct {
	AccessToken string
	Expires     int //(response.ExpiresIn * time.Millisecond),
}

Jump to

Keyboard shortcuts

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