Connect your application
To configure and connect your application with Veriam, follow these steps:
Configure application on Veriam
Log in to Veriam Admin Portal.
Navigate to the 'Applications' page.
Click on 'Add Application'.
Enter your application details, including 'Application Name' and 'Description'.
For 'Application Type', select the type that best suits your application.
Enter your 'Application URL'. This is the URL where your application can be accessed. This information is for setup purposes only and is not shared with customers.
Go to the Connection Configuration tab. Enter at least 1 ‘Redirect URL’, this is the URL where Veriam sends the user after authentication.
You can add multiple Redirect URLs. If multiple Redirect URLs are entered, make sure to indicate which Redirect URL needs to be used in the authentication request.
Click on 'Save'. Your application is now configured.
You will see a popup with the Client Secret. Make sure to copy this and add this in the configuration of your application.
Close the modal and copy the Client ID. Add this to the configuration of your application as well, together with the Veriam OpenID Connect Discovery URL.
Using OpenID Connect
Configuration at your application
Veriam uses the OpenID Connect (OIDC) as authentication protocol.
Make sure to configure the Client ID, Client Secret and OIDC Discovery URL in your application.
The Client ID can be retrieved from the ‘Connection Configuration’ tab of your application configuration (under the menu item ‘Configuration’, ‘Applications’ tab).
The Client Secret is provided after adding your the application to Veriam. If needed, you can renew the Client Secret by clicking the ‘Renew Client Secret’ option on your application detail page. Note: Doing this will make the previous client secret unusable.
The OIDC Discovery URL can also be found on the application detail page.
Make an authentication request / Redirect user to Veriam for login & sign up
Below description is for a Single Page Application (SPA). Other examples will become available later, but the generic steps are the same.
Single Page Application (SPA)
To integrate Veriam with a SPA you can use an OpenID client like the oidc-client-ts, for example. The first step is define the configuration and the associated User Manager:
You can then trigger a login from your app using the command below:
And also a logout:
To retrieve information about the User which is authenticated:
To include a direct link to a signup button:
Using Postman (alternative to Step 2)
First, you need to add the Redirect URL from Postman to your application in Veriam:
https://oauth.pstmn.io/v1/callback
Then in the Postman application you need to choose the Authorization of Type OAuth 2.0, with the following settings:
Header Prefix: Bearer
Token Name: <YOUR_TOKEN_NAME> (can be anything)
Grant Type: Authorization Code (with PKCE)
Authorize using Browser: (Selected)
Callback URL: https://oauth.pstmn.io/v1/callback (this is pre-filled from selecting item above)
Access Token URL: https://idp.myveriam.com/oauth2/token
Client ID: <YOUR_CLIENT_ID>
Client Secret: <YOUR_CLIENT_SECRET>
Code Challenge Method: SHA-256
State: <YOUR_STATE> (can be anything)
Client Authentication: Send client credentials in body
Once those have been filled, click on Get New Access Token button and you should be redirected to login on Veriam and after a successful authentication you should be redirected to the Postman app with the access token for subsequent requests to the API.
Last updated