Skip to content

Commit

Permalink
Tweaked some awkward docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Jan 8, 2025
1 parent bb612cb commit 755ad7d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/login/challenge/abstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ export abstract class AbstractLoginChallenge<TChallengeParameters> {
abstract parametersContainsResponse(parameters: AuthorizationChallengeRequest): parameters is TChallengeParameters & AuthorizationChallengeRequest;

/**
* Emits the challenge. This is done in situations that no credentials have
* been received yet.
* Emits the initial challenge.
*
* This notifies the user that some kind of response is expected as a reply
* to this challenge.
*/
abstract challenge(session: LoginSession): never;

/**
* Validates whether the parameters object contains expected values.
*
* This for instance will make sure that a 'possword' key was provided for
* This for instance will make sure that a 'password' key was provided for
* the Password challenge.
*/
validateParameters(parameters: AuthorizationChallengeRequest): asserts parameters is TChallengeParameters & AuthorizationChallengeRequest {
Expand Down
6 changes: 4 additions & 2 deletions src/login/challenge/password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ export class LoginChallengePassword extends AbstractLoginChallenge<PasswordParam
}

/**
* Emits the challenge. This is done in situations that no credentials have
* been received yet.
* Emits the initial challenge.
*
* This notifies the user that some kind of response is expected as a reply
* to this challenge.
*/
challenge(session: LoginSession): never {

Expand Down
6 changes: 4 additions & 2 deletions src/login/challenge/totp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ export class LoginChallengeTotp extends AbstractLoginChallenge<TotpParameters> {
}

/**
* Emits the challenge. This is done in situations that no credentials have
* been received yet.
* Emits the initial challenge.
*
* This notifies the user that some kind of response is expected as a reply
* to this challenge.
*/
challenge(session: LoginSession): never {

Expand Down

0 comments on commit 755ad7d

Please sign in to comment.