Class LoginTicket (9.0.0)

Package

google-auth-library

Constructors

(constructor)(env, pay)

constructor(env?: string, pay?: TokenPayload);

Create a simple class to extract user ID from an ID Token

Parameters
NameDescription
env string

Envelope of the jwt

pay TokenPayload

Payload of the jwt

Methods

getAttributes()

getAttributes(): {
        envelope: string | undefined;
        payload: TokenPayload | undefined;
    };

Returns attributes from the login ticket. This can contain various information about the user session.

The envelope and payload

Returns
TypeDescription
{ envelope: string | undefined; payload: TokenPayload | undefined; }

getEnvelope()

getEnvelope(): string | undefined;
Returns
TypeDescription
string | undefined

getPayload()

getPayload(): TokenPayload | undefined;
Returns
TypeDescription
TokenPayload | undefined

getUserId()

getUserId(): string | null;

Create a simple class to extract user ID from an ID Token

The user ID

Returns
TypeDescription
string | null