Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(admin-ui): develop screens to accept license api-keys #187

Closed
duttarnab opened this issue Apr 13, 2022 · 1 comment
Closed

feat(admin-ui): develop screens to accept license api-keys #187

duttarnab opened this issue Apr 13, 2022 · 1 comment
Labels
comp-admin-ui Component affected by issue or PR enhancement New feature or request

Comments

@duttarnab
Copy link
Contributor

duttarnab commented Apr 13, 2022

Users should be able to use Admin UI only after entering license API keys and license-key.

Steps:

  1. After installation, when the user will visit Admin-UI, the GUI will check if license is active. It will call below endpoint. If the endpoint returns true (apiResult) then it will redirect to login page.

GET https://admin-ui-test.gluu.org/jans-config-api/admin-ui/license/isActive

Success Response:
{
"apiResult": true,
"responseMessage": "Success!!",
"responseCode": 200
}
Failure Response:
{
"apiResult": false,
"responseMessage": "Active license not present.",
"responseCode": 500
}
3. If it returns false (apiResult) then it will redirect to page asking for API keys.
image

  1. After entering API keys user will click on the Next button to call below endpoint. If the endpoint returns true then user can go to next page to enter license-key. If it returns false then it will show error message: Error in validation. Please check if the entered details are correct.

POST https://admin-ui-test.gluu.org/jans-config-api/admin-ui/license/saveApiCredentials
Request
{
"apiKey":"xxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx",
"productCode":"xxxxxxxxxx",
"sharedKey":"xxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxx",
"managementKey":"xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx"
}
Success Response:
{
"apiResult": true,
"responseMessage": "Success!!",
"responseCode": 201
}
Failure Response:
{
"apiResult": false,
"responseMessage": "The license credentials are not valid..",
"responseCode": 500
}
image

  1. If the correct license-key is submitted then the User will be redirected to the login page else it will show error message to enter correct license-keys.

Endpoint to verify license-key: POST https://admin-ui-test.gluu.org/jans-config-api/admin-ui/license/activateLicense

Request:
{
"licenseKey":"xxxxxxxxxx-xxxxxxxxxxx-xxxxxxxxx"
}
Success REsopnse
{
"apiResult": true,
"responseMessage": "The license activated successfully.",
"responseCode": 200
}
Failure Response
{
"apiResult": false,
"responseMessage": "The license-key is not correct.",
"responseCode": 500
}
or
{
"apiResult": false,
"responseMessage": "The license has been already activated.",
"responseCode": 500
}

@duttarnab
Copy link
Contributor Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-admin-ui Component affected by issue or PR enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant