POST OAuth/SetConfiguration
Sets and updates the global OAuth configuration parameters.
SetConfiguration must express the complete configuration as desired. All fields in the structure will be stored when the request is received. If they are not set in the request, they will be defaulted.
A best practice is to get the current configuration using GetConfiguration, modify that response as desired, and then pass the entire structure into the SetConfiguration request.
Requirements
- Roles: Admin
- Token scope: Admin
Headers
-
Content type: Content-Type:application/json.
- Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.
Parameters
Name |
Description |
---|---|
Configuration object |
(Required) An object that contains configuration information for remote access. The following values can be passed in this object. All values are optional.
|
Response
Name |
Description |
---|---|
HTTP 200 |
See OAuth result codes. |
HTTP 400 |
For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:
|
HTTP 401 |
For authentication errors, this call returns HTTP 401 Unauthorized and the following data in the message body:
|
HTTP 403 |
If the response is HTTP 403 Forbidden, the requester's token does not include the admin scope. Call POST Authorize/OAuth with the correct scope and restriction. Update the header with the new token and retry.
|
Example
Request
POST /vedsdk/oauth/SetConfiguration HTTP/1.1 Host: tpp-server-url Content-Type: application/json Accept: application/json Authorization: Bearer 4MyGeneratedBearerTknz== { "Configuration": { "AuthorizeByCertificate": true, "AuthorizeByIntegrated": true, "AuthorizeByJwt": true, "AuthorizeByPassword": true, "AuthorizeDevice": true, "CertificateConfiguration": { "AuthorizedIssuerDns": [ "\\VED\\Intermediate and Root Certificates\\DigiCert_Assured_ID_Root_CA_Root_2031" ], "SourceField": "CN" }, "DefaultAccessTokenValidity": 7776000, "DefaultGrantRefreshable": true, "DefaultGrantValidity": 31536000, "DeviceConfiguration": { "VerificationUri": "\\/aperture\\/activate", "VerificationUriCompleteFormat": "\\/aperture\\/activate\\/{0}" }, "OpenApiEnabled": true, "OpenApiUi": "redoc", "SessionPoolAge": 86400, "SessionPoolExpirationInterval": 300, "SessionPoolSize": 5000, "SessionRightsRefreshInterval": 60, "StatisticsApiTracking": true, "StatisticsTrackingIncludesTime": true, "StrictExpiration": true, "UnusedAccessTokenExpiration": 82800 } }
Response
{ "Result": 0, "Success": true }