Documentation ¶
Index ¶
- Variables
- func CreateAgent(realm, agentName, payloadPath string) (err error)
- func CreateIdentity(realm string, attributes IdAttributes) error
- func CreateRealm(parentPath, realmName string, aliases ...string) (realmId string, err error)
- func CreateScript(realm string, config io.Reader) (err error)
- func CreateSecretMapping(secretID string, aliases []string) (err error)
- func CreateService(realm, serviceType string, config io.Reader) (err error)
- func CreateTree(realm, id string, config io.Reader) (err error)
- func CreateTreeNode(realm, nodeType, id string, config io.Reader) (err error)
- func DeleteAgent(realm string, agentName string) (err error)
- func DeleteIdentity() (err error)
- func DeleteRealm(realmId string) (err error)
- func DeleteScript(realm string, id string) (err error)
- func DeleteService(realm string, serviceName string) (err error)
- func DeleteTree(realm, id string) (err error)
- func DeleteTreeNode(realm, nodeType, id string) (err error)
- func GetAdvancedServerProperties() (properties map[string]interface{}, err error)
- func GetIdentity(realm, name string) ([]byte, error)
- func GetService(realm, name string) (response []byte, err error)
- func LogoutSession(token string) (err error)
- func SetAdvancedServerProperties(properties map[string]interface{}) (err error)
- func URL(subDomain string) string
- func UpdateAgent(realm, agentName, payloadPath string) (err error)
- func UpdateRealm(properties RealmProperties) (err error)
- func UpdateService(realm, name string, payload io.Reader) (response []byte, err error)
- type IdAttributes
- type RealmProperties
Constants ¶
This section is empty.
Variables ¶
var AMURL = URL("am")
Base AM URL
var DebugLogger = log.New(ioutil.Discard, "", 0)
Functions ¶
func CreateAgent ¶
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 ¶
CreateRealm creates a realm with the given name Returns the realm Id that is required to modify/delete the realm
func CreateScript ¶
CreateScript creates the script in the realm
func CreateSecretMapping ¶
CreateSecretMapping creates or updates the secret mapping in the default keystore
func CreateService ¶
CreateService creates a service in the realm
func CreateTree ¶
CreateTree creates an auth tree in the realm
func CreateTreeNode ¶
CreateTreeNode creates an auth tree node in the realm
func DeleteAgent ¶
DeleteAgent deletes the agent from the realm
func DeleteRealm ¶
DeleteRealm deletes the realm with the given Id
func DeleteScript ¶
DeleteScript deletes the script from the realm
func DeleteService ¶
DeleteService deletes the service from the realm
func DeleteTree ¶
DeleteTree deletes the auth tree from the realm
func DeleteTreeNode ¶
DeleteTreeNode deletes the auth tree node from the realm
func GetIdentity ¶
GetIdentity gets the identity from AM
func GetService ¶
GetService returns the realm configuration of the given service
func LogoutSession ¶
LogoutSession represented by the given token
func UpdateAgent ¶
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
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