Prev | Next |
GetAuthorisationDetails
Return the Authorization methods that your provider requires.
Supported types are:
- none
- basic
- OAuth
Inputs
Parameter |
Details |
---|---|
parameters |
A JSON string of parameters. This is an empty string reserved for future use.. |
Outputs via Callbacks
- [Optional] AddProperty - to specify which authorisation methods are available and properties of these methods
- [Optional] LogMessage or SetError - to provide user feedback.
Details
For no authorisation, do nothing in this method.
Enterprise Architect only supports the OAuth 2.0 Authorization Code Grant type.
OAuth Authorisation will set Enterprise Architect to prompt to open a browser page for the user to log in to the OAuth provider (the 'authorization endpoint URI').
The OAuth provider will send back a 'code' to Enterprise Architect. Enterprise Architect will then call PostOAuthCode with the new code.
Note: If OAuth is specified then it will take priority and not allow basic authorisation.
OAuth requires the authorizationEndpointURIand redirectURI of the OAuth provider.
For Enterprise Architect, the redirectURI must be "http://localhost:8888/oauth/callback".
This usually needs to be added to your OAuth provider as an allowed redirect URI.
Basic Authorisation will set Enterprise Architect to prompt for a usename and password which will be passed back with each subsequent request.
Example Implementation
Basic Authorisation:
AddProperty(index, "basic", "true");
OAuth:
AddProperty(index, "OAuthConfiguration", "true");
AddProperty(index, "authorizationEndpointURI", "https://example.com/oauth/authorize");
AddProperty(index, "redirectURI", "http://localhost:8888/oauth/callback");