Skip to main content

Interface: TokenOptions

Defined in: src/types/interfaces/auth.interface.ts:21

Token issuance options.

Properties

expiresIn?

readonly optional expiresIn: number

Defined in: src/types/interfaces/auth.interface.ts:31

Token expiry in seconds.

Remarks

Maximum allowed value is 3600 (1 hour) for access tokens. Refresh tokens have a separate expiry controlled by the session manager.

Default Value

3600

includeRefreshToken?

readonly optional includeRefreshToken: boolean

Defined in: src/types/interfaces/auth.interface.ts:48

Include refresh token in response.

Default Value

true

scope?

readonly optional scope: readonly string[]

Defined in: src/types/interfaces/auth.interface.ts:41

Scopes to grant.

Remarks

Scopes follow the format {resource}:{action} (e.g., "read:preprints").

Example

["read:preprints", "write:reviews"]

sessionId?

readonly optional sessionId: string

Defined in: src/types/interfaces/auth.interface.ts:56

Session ID to associate with the token.

Remarks

If not provided, a new session will be created.