Interface SessionCredentials

Session credentials for OAuth and token-based authentication

Contains the tokens and metadata needed for authenticated API requests. This interface is used to store and manage authentication state.

const session: SessionCredentials = {
accessToken: 'your-access-token',
refreshToken: 'your-refresh-token',
authType: 'oauth',
sub: 'user-123',
iat: '1640995200',
exp: '1640998800'
};
interface SessionCredentials {
    accessToken: string;
    refreshToken: string;
    authType?: "password" | "client" | "refresh" | "oauth";
    sub?: string;
    iat?: string;
    exp?: string;
}

Properties

accessToken: string

Access token for authentication

refreshToken: string

Refresh token for token refresh operations

authType?: "password" | "client" | "refresh" | "oauth"

Authentication type

sub?: string

Subject identifier (user ID)

iat?: string

Token issued at timestamp

exp?: string

Token expiration timestamp