lib/auth/types
Esta página aún no está disponible en tu idioma.
Interfaces
Section titled “Interfaces”ExpiringBucket
Section titled “ExpiringBucket”Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:77
Represents a bucket with an expiration mechanism.
ExpiringBucket
Properties
Section titled “Properties”count: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:78
The number of items in the bucket.
createdAt
Section titled “createdAt”createdAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:79
The timestamp when the bucket was created.
OAuthAccountsTable
Section titled “OAuthAccountsTable”Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:16
Represents a table of OAuth accounts.
OAuthAccountsTable
Extends
Section titled “Extends”tsOAuthAccountsSelect
Properties
Section titled “Properties”provider
Section titled “provider”provider: string;
The name of the OAuth provider (e.g., Google, Facebook).
Inherited from
Section titled “Inherited from”tsOAuthAccountsSelect.provider
providerUserId
Section titled “providerUserId”providerUserId: string;
The unique identifier for the user provided by the OAuth provider.
Inherited from
Section titled “Inherited from”tsOAuthAccountsSelect.providerUserId
userId
Section titled “userId”userId: string;
The unique identifier for the user within the application.
Inherited from
Section titled “Inherited from”tsOAuthAccountsSelect.userId
PermissionsTable
Section titled “PermissionsTable”Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:24
Interface representing a table of user permissions.
Extends
Section titled “Extends”tsPermissionsSelect
Properties
Section titled “Properties”rank: string;
The rank or role assigned to the user.
Inherited from
Section titled “Inherited from”tsPermissionsSelect.rank
user: string;
The username of the individual.
Inherited from
Section titled “Inherited from”tsPermissionsSelect.user
RefillBucket
Section titled “RefillBucket”Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:65
Represents an individual refillable token bucket.
RefillBucket
Properties
Section titled “Properties”count: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:66
The current token count in the bucket.
refilledAt
Section titled “refilledAt”refilledAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:67
The last timestamp when tokens were refilled.
ThrottlingCounter
Section titled “ThrottlingCounter”Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:88
Interface representing a throttling counter.
Properties
Section titled “Properties”timeout
Section titled “timeout”timeout: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:89
The duration (in milliseconds) for which the throttling is applied.
updatedAt
Section titled “updatedAt”updatedAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:90
The timestamp (in milliseconds since epoch) when the throttling counter was last updated.
Type Aliases
Section titled “Type Aliases”SessionValidationResult
Section titled “SessionValidationResult”type SessionValidationResult = | UserSession | { session: null; user: null;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:56
Represents the result of a session validation.
This type can either be a valid UserSession
or an object indicating
an invalid session with both session
and user
properties set to null
.
UserSession
Section titled “UserSession”type UserSession = { session: tsSessionTableSelect; user: tsUsersSelect;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:45
Represents a user session which includes user information and session details.
Properties
Section titled “Properties”session
Section titled “session”session: tsSessionTableSelect;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:47
The session details.
user: tsUsersSelect;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:46
The user information.
UserSessionData
Section titled “UserSessionData”type UserSessionData = { isLoggedIn: boolean; permissionLevel: "owner" | "admin" | "editor" | "visitor" | "unknown"; user: tsUsersSelect | null;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:33
Represents the session data for a user.
Properties
Section titled “Properties”isLoggedIn
Section titled “isLoggedIn”isLoggedIn: boolean;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:34
Indicates whether the user is logged in.
permissionLevel
Section titled “permissionLevel”permissionLevel: "owner" | "admin" | "editor" | "visitor" | "unknown";
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:36
The permission level of the user.
user: tsUsersSelect | null;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:35
The user data, or null if no user is logged in.