LineIdToken

class LineIdToken(val rawValue: String, val subject: String?, val name: String?, val pictureUrl: String?, val email: String?, val nonce: String?)

The OpenID Connect ID token issued when LineScope.OpenId is granted.

This is the one part of a login result that carries proof of its own authenticity: LINE signs it, so a backend can verify it without trusting the app. Send rawValue to your server and validate it there against https://api.line.me/oauth2/v2.1/certs — checking the signature, the aud (your channel ID), the iss, the exp, and the nonce you issued.

The decoded properties below are read straight out of the payload without verifying the signature. They exist so you can greet the user immediately after login. Never use them for an authorization decision, and never trust them on a server.

Constructors

Link copied to clipboard
constructor(rawValue: String, subject: String?, name: String?, pictureUrl: String?, email: String?, nonce: String?)

Properties

Link copied to clipboard

The email claim. Present only when LineScope.Email was granted and the channel has the email permission approved.

Link copied to clipboard
val name: String?

The name claim. Present only when LineScope.Profile was also granted.

Link copied to clipboard

The nonce claim, echoing LineLoginRequest.nonce.

Link copied to clipboard

The picture claim.

Link copied to clipboard

The JWT exactly as LINE issued it. This is what your backend needs.

Link copied to clipboard

The sub claim — the same value as LineProfile.userId.

Functions

Link copied to clipboard
open override fun toString(): String