sec.oauthServer( oauth-vendor as String, oauth-server-uri as String, oauth-authorization-server-uri as String, oauth-token-server-uri as String, oauth-introspection-server-uri as String, oauth-flow-type as String, oauth-scope as String, oauth-client-authentication-method as String, oauth-client-id as String, oauth-client-secret as String, oauth-redirect-uri as String, oauth-token-type as String, oauth-username-attribute as String, oauth-role-attribute as String, oauth-privilege-attribute as String ) as element(sec.oauthServer)
This function configures an OAuth server for use by the sec:create-external-security function.
This function must be executed against the security database.
// execute this against the security database const sec = require('/MarkLogic/security'); sec.oauthServer("Ping Identity", "https://dc1.mltest1.local:9031", "https://dc1.mltest1.local:9031/as/authorization.oauth2", "https://dc1.mltest1.local:9031/as/token.oauth2", "https://dc1.mltest1.local:9031/as/introspection.oauth2", "Authorization code", "test", "Client secret", "cluster", "Insert client secret***", "https://macpro-3912.marklogic.com:8008/test.xqy", "Internally managed reference tokens", "username", "roles", "privileges");
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.