am

package
v0.0.0-...-ee64981 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AMURL = URL("am")

Base AM URL

View Source
var DebugLogger = log.New(ioutil.Discard, "", 0)

Functions

func CreateAgent

func CreateAgent(realm, agentName, payloadPath string) (err error)

CreateAgent creates an agent (OAuth 2.0 Client, JWT Issuer etc) in the realm

func CreateIdentity

func CreateIdentity(realm string, attributes IdAttributes) error

CreateIdentity creates an identity in the the given realm using the supplied attributes

func CreateRealm

func CreateRealm(parentPath, realmName string, aliases ...string) (realmId string, err error)

CreateRealm creates a realm with the given name Returns the realm Id that is required to modify/delete the realm

func CreateScript

func CreateScript(realm string, config io.Reader) (err error)

CreateScript creates the script in the realm

func CreateSecretMapping

func CreateSecretMapping(secretID string, aliases []string) (err error)

CreateSecretMapping creates or updates the secret mapping in the default keystore

func CreateService

func CreateService(realm, serviceType string, config io.Reader) (err error)

CreateService creates a service in the realm

func CreateTree

func CreateTree(realm, id string, config io.Reader) (err error)

CreateTree creates an auth tree in the realm

func CreateTreeNode

func CreateTreeNode(realm, nodeType, id string, config io.Reader) (err error)

CreateTreeNode creates an auth tree node in the realm

func DeleteAgent

func DeleteAgent(realm string, agentName string) (err error)

DeleteAgent deletes the agent from the realm

func DeleteIdentity

func DeleteIdentity() (err error)

DeleteIdentity deletes the identity from AM

func DeleteRealm

func DeleteRealm(realmId string) (err error)

DeleteRealm deletes the realm with the given Id

func DeleteScript

func DeleteScript(realm string, id string) (err error)

DeleteScript deletes the script from the realm

func DeleteService

func DeleteService(realm string, serviceName string) (err error)

DeleteService deletes the service from the realm

func DeleteTree

func DeleteTree(realm, id string) (err error)

DeleteTree deletes the auth tree from the realm

func DeleteTreeNode

func DeleteTreeNode(realm, nodeType, id string) (err error)

DeleteTreeNode deletes the auth tree node from the realm

func GetAdvancedServerProperties

func GetAdvancedServerProperties() (properties map[string]interface{}, err error)

func GetIdentity

func GetIdentity(realm, name string) ([]byte, error)

GetIdentity gets the identity from AM

func GetService

func GetService(realm, name string) (response []byte, err error)

GetService returns the realm configuration of the given service

func LogoutSession

func LogoutSession(token string) (err error)

LogoutSession represented by the given token

func SetAdvancedServerProperties

func SetAdvancedServerProperties(properties map[string]interface{}) (err error)

func URL

func URL(subDomain string) string

func UpdateAgent

func UpdateAgent(realm, agentName, payloadPath string) (err error)

UpdateAgent updates an agent's (OAuth 2.0 Client, JWT Issuer etc) configuration in AM

func UpdateRealm

func UpdateRealm(properties RealmProperties) (err error)

UpdateRealm updates the realm with the given properties

func UpdateService

func UpdateService(realm, name string, payload io.Reader) (response []byte, err error)

UpdateService updates the realm configuration of the given service

Types

type IdAttributes

type IdAttributes struct {
	Name                  string             `json:"username"`
	Password              string             `json:"userPassword,omitempty"`
	ThingType             callback.ThingType `json:"thingType,omitempty"`
	ThingKeys             jose.JSONWebKeySet `json:"thingKeys,omitempty"`
	ThingOAuth2ClientName string             `json:"thingOAuth2ClientName,omitempty"`
	ThingConfig           string             `json:"thingConfig,omitempty"`
}

IdAttributes contains identity attributes

func (IdAttributes) String

func (id IdAttributes) String() string

type RealmProperties

type RealmProperties struct {
	ID         string   `json:"_id,omitempty"`
	Name       string   `json:"name"`
	Active     bool     `json:"active"`
	ParentPath string   `json:"parentPath"`
	Aliases    []string `json:"aliases"`
}

func GetRealm

func GetRealm(fullName string) (properties RealmProperties, err error)

GetRealm searches for te realm with the given name

Jump to

Keyboard shortcuts

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