Decode JSON Web Token (JWT) - CodeB Identity Solutions Decode JSON Web Token (JWT) - CodeB Identity Solutions

View Categories

Decode JSON Web Token (JWT)

1 min read

In OpenID Connect, a JSON Web Token (JWT) is a compact and URL-safe method used to represent claims transferred between two parties. OpenID Connect is an uncomplicated identity layer that is built on the OAuth 2.0 protocol. It allows clients to confirm the identity of an end-user based on the authentication executed by an authorization server.

Within the framework of OpenID Connect, JWTs are predominantly used as Bearer Tokens. These tokens signify that the bearer has the requisite permissions to access a secure resource.

To request a Mobile Bearer Token, you should refer to the MobileToken function.

For decoding a JSON Web Token (JWT) or a Bearer Token, you will need to invoke the DecodeMobileToken function.

API Endpoint:
<BaseURL>/ws/mobile.asmx?op=DecodeMobileToken

Demo Server Example:
https://auth.codeb.io/ws/mobile.asmx?op=DecodeMobileToken

Required Parameters: The JSON Web Token (JWT) or Bearer Token that needs to be decoded.

Result:
If the token is valid, the function will return the payload in JSON Format.

Sample Result:

{
“app”: “sms”,
“at_hash”: “NPsccryXaTfQpZhJFgdGzg”,
“ver”: “1.0”,
“socialIdpUserId”: “F291A249”,
“mAuthId”: “0b0734dac0b04be89cf4621a83a46b03”,
“preferred_username”: “F291A249”,
“nameidentifier”: “F291A249”,
“given_name”: “Stefan”,
“nonce”: “22608”,
“client_id”: “CodeB Web Services”,
“c_hash”: “NPsccryXaTfQpZhJFgdGzg”,
“nbf”: 1695850270,
“email_address”: “stefan@nomail.tld”,
“idp”: “CodeB SMS”,
“azp”: “CodeB Web Services”,
“auth_time”: 1695850450,
“name”: “Stefan Engel”,
“nickname”: “Stefan”,
“phone_number”: “35679567034”,
“id”: “F291A249”,
“state”: “22608”,
“family_name”: “Engel”,
“jti”: “10051”,
“sub”: “F291A249”,
“iss”: “https://www.codeb.io”,
“aud”: “CodeB Web Services”,
“iat”: 1695850450,
“exp”: 1695936850
}

Powered by BetterDocs