-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
128 additions
and
88 deletions.
There are no files selected for viewing
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
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,44 @@ | ||
import { StrategyInstance } from "src/model/postgres/StrategyInstance.entity"; | ||
import { LoginState } from "src/model/postgres/UserLoginData.entity"; | ||
|
||
export class UserLoginDataResponse { | ||
/** | ||
* The unique ID of this login data | ||
* | ||
* @example 12345678-90ab-cdef-fedc-ab0987654321 | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* The state this authentication is in. | ||
* | ||
* Rules: | ||
* - Only UserLoginData in state {@link LoginState.VALID} may be used for login and retrieving an access token. | ||
* - Only UserLoginData in state {@link LoginState.WAITING_FOR_REGISTER} may be used for registration or linking. | ||
* - UserLoginData in state {@link LoginState.BLOCKED} cannot be used for anything | ||
* | ||
* @example "VALID" | ||
*/ | ||
state: LoginState | ||
|
||
/** | ||
* If not `null`, this authentication should be considered *invalid* on any date+time AFTER this. | ||
* This is to ensure created UserLoginData, that are not used for registration | ||
* or linking in time, are not kept forever. | ||
* | ||
* If `null`, the authentication should not expire by date. | ||
*/ | ||
expires: Date | null | ||
|
||
/** | ||
* The strategy instance this authentication uses. | ||
* | ||
* For example a UserLoginData containing a password would reference a strategy instance of type userpass | ||
*/ | ||
strategyInstance: StrategyInstance | ||
|
||
/** | ||
* A description of the authentication | ||
*/ | ||
description: string | ||
} |
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
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
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
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
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
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
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
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
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