api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHA256Hash = "S256" // the SHA-256 hashing alorithm used to generate the code challenge for PKCE
)

oath related data

Variables

This section is empty.

Functions

func Challenge

func Challenge(challenge string) oauth2.AuthCodeOption

Challenge sets the appropriate code challenge

func GenerateCodeChallenge

func GenerateCodeChallenge(verifier string) string

GenerateCodeChallenge generates a code challenge from a code verifier

func GenerateCodeVerifier

func GenerateCodeVerifier() (string, error)

GenerateCodeVerifier generates a random code verifier string

func Method

func Method(hashingType string) oauth2.AuthCodeOption

Method sets the appropriate hashing algorithm used in generating the code challenge

func ValidateCodeVerifier

func ValidateCodeVerifier(verifier, challenge string) error

ValidateCodeVerifier validates a code verifier against a code challenge

func Verifier

func Verifier(verifier string) oauth2.AuthCodeOption

Verifier sets the appropriate verifier

Types

type AppdClient

type AppdClient struct {
	Username     string
	Password     string
	Tenant       string
	AuthMethod   string
	URL          string
	Token        string
	RefreshToken string
	SecretFile   string
	APIClient    *http.Client
}

func (*AppdClient) CreateObject added in v0.0.2

func (ac *AppdClient) CreateObject(fullyQualifiedTypeName, layerID, layerType string, body []byte) error

CreateObject is a method used to POST the knowledge store object based on the fullyQualifiedTypeName with the payload set in the body layerID which will be the tenant and layerType (TENANT/SOLUTION/...)

func (*AppdClient) DeleteObject added in v0.0.2

func (ac *AppdClient) DeleteObject(fullyQualifiedTypeName, objectID, layerID, layerType string) error

DeleteObject is a method used to DELETE the knowledge store object based on the fullyQualifiedTypeName and objectID layerID which will be the tenant and layerType (TENANT/SOLUTION/...)

func (*AppdClient) GetObject

func (ac *AppdClient) GetObject(fullyQualifiedTypeName, objectID, layerID, layerType string) ([]byte, error)

GetObject is a method used to GET the knowledge store object based on the fullyQualifiedTypeName and objectID layerID which will be the tenant and layerType (TENANT/SOLUTION/...) If objectID ie an empty string this will result in a list of objects being returned

func (*AppdClient) GetType

func (ac *AppdClient) GetType(fullyQualifiedTypeName string) ([]byte, error)

GetType is a method used to GET the type based on the fullyQualifiedTypeName

func (*AppdClient) Login

func (ac *AppdClient) Login() error

func (*AppdClient) UpdateObject added in v0.0.2

func (ac *AppdClient) UpdateObject(fullyQualifiedTypeName, objectID, layerID, layerType string, body []byte) error

UpdateObject is a method used to PUT the knowledge store object based on the fullyQualifiedTypeName with the payload set in the body layerID which will be the tenant and layerType (TENANT/SOLUTION/...)

Jump to

Keyboard shortcuts

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