Documentation
¶
Index ¶
- Constants
- func Challenge(challenge string) oauth2.AuthCodeOption
- func GenerateCodeChallenge(verifier string) string
- func GenerateCodeVerifier() (string, error)
- func Method(hashingType string) oauth2.AuthCodeOption
- func ValidateCodeVerifier(verifier, challenge string) error
- func Verifier(verifier string) oauth2.AuthCodeOption
- type AppdClient
- func (ac *AppdClient) CreateObject(fullyQualifiedTypeName, layerID, layerType string, body []byte) error
- func (ac *AppdClient) DeleteObject(fullyQualifiedTypeName, objectID, layerID, layerType string) error
- func (ac *AppdClient) GetObject(fullyQualifiedTypeName, objectID, layerID, layerType string) ([]byte, error)
- func (ac *AppdClient) GetType(fullyQualifiedTypeName string) ([]byte, error)
- func (ac *AppdClient) Login() error
- func (ac *AppdClient) UpdateObject(fullyQualifiedTypeName, objectID, layerID, layerType string, body []byte) error
Constants ¶
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 ¶
GenerateCodeChallenge generates a code challenge from a code verifier
func GenerateCodeVerifier ¶
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 ¶
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/...)