Get Started - JAVA
Steps to Get and Verify the Token
Receive the Response:
Verify the Token:
Establish Session:
Sample API Response (Status API)
{
"authenticated": true,
"access_token": "eyJhbGc****TkyoyIWN9JbYhkuqE",
"token_type": "Bearer",
"expires_at": "2024-08-17T05:36:11Z",
"profile": {
"id": "6667d***03d109*****",
"idp_id": "104***6374619797",
"account_id": "644b7****553***a75",
"connection_type": "MagicLink",
"email": "user@example.com",
"first_name": "fname",
"last_name": "lname",
"raw_attributes": {
"verified_email": true,
"email": "user@example.com",
"family_name": "fname",
"given_name": "lanem",
"hd": "compile7.com",
"id": "1043572269163******",
"name": "full name",
"picture": "<https://lh3.googleusercontent.com/a>"
},
"tenants": [
{
"tenant_id": "664e26862cbfbdb*******",
"tenant_name": "org1",
"roles": [
{
"role_id": "6638***21ce81c",
"role_name": "Admin",
"permissions": null
}
],
"status": "Verified"
},
{
"tenant_id": "666****3adc***d1c0",
"tenant_name": "org2",
"roles": [
{
"role_id": "66***13bd4****e81c",
"role_name": "Admin",
"permissions": null
}
],
"status": "Verified"
}
],
"created_at": "2024-06-11T04:58:38.983Z",
"modified_at": "2024-07-18T05:36:11.231Z",
"is_active": false,
"LastLoginAt": "2024-07-18T05:36:11.231Z"
}
}
Verify JWT Token Using JWKS
Dependencies
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-resource-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
</dependency>
</dependencies>
Security Configuration
Controller
Application Properties
Modified at 2024-07-25 11:12:14