-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3175b2
commit cb018ba
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
documentation-v3/src/reference/main/AuthRequest/deleteSessionCookie.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
type: "method" | ||
--- | ||
|
||
Deletes the session cookie by setting a cookie that expires immediately. | ||
|
||
## Definition | ||
|
||
```ts | ||
function deleteSessionCookie(): void; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
type: "class" | ||
--- | ||
|
||
The core API. | ||
|
||
## Constructor | ||
|
||
```ts | ||
//$ Lucia=ref:main | ||
//$ SessionCookie=ref:main | ||
//$ RequestContext=ref:main | ||
function constructor<_Lucia extends $$Lucia = Lucia>( | ||
lucia: _Lucia, | ||
requestContext: $$RequestContext | ||
): this; | ||
``` | ||
|
||
### Parameters | ||
|
||
- `lucia` | ||
- `sessionCookie` | ||
|
||
## Method | ||
|
||
- [`deleteSessionCookie()`](ref:main/AuthRequest) | ||
- [`setSessionCookie()`](ref:main/AuthRequest) | ||
- [`validate()`](ref:main/AuthRequest) | ||
- [`validateBearerToken()`](ref:main/AuthRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
type: "method" | ||
--- | ||
|
||
Sets a session cookie for the provided session. | ||
|
||
## Definition | ||
|
||
```ts | ||
function setSessionCookie(): void | ||
``` | ||
|
||
### Parameters | ||
|
||
- `userId` | ||
- `attributes`: Database session attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
type: "method" | ||
--- | ||
|
||
Validates the session cookie. --TODO--- | ||
|
||
## Definition | ||
|
||
```ts | ||
function validate(): Promise<{ user: User; session: Session } | { user: null; session: null }>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
type: "method" | ||
--- | ||
|
||
Validates the bearer token in the `Authorization` header. --TODO--- | ||
|
||
## Definition | ||
|
||
```ts | ||
function validateBearerToken(): Promise< | ||
{ user: User; session: Session } | { user: null; session: null } | ||
>; | ||
``` |