@travetto/auth 7.1.3 → 8.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/config.ts +1 -1
- package/src/types/authenticator.ts +1 -1
- package/src/types/error.ts +2 -2
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ export interface Authenticator<T = unknown, C = unknown, P extends Principal = P
|
|
|
74
74
|
*
|
|
75
75
|
* @returns Valid principal if authenticated
|
|
76
76
|
* @returns undefined if authentication is valid, but incomplete (multi-step)
|
|
77
|
-
* @throws
|
|
77
|
+
* @throws Error if authentication fails
|
|
78
78
|
*/
|
|
79
79
|
authenticate(payload: T, context?: C): Promise<P | undefined> | P | undefined;
|
|
80
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Authentication scaffolding for the Travetto framework",
|
|
6
6
|
"keywords": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"directory": "module/auth"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@travetto/context": "^
|
|
27
|
+
"@travetto/context": "^8.0.0-alpha.0"
|
|
28
28
|
},
|
|
29
29
|
"travetto": {
|
|
30
30
|
"displayName": "Authentication"
|
package/src/config.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Authenticator<T = unknown, C = unknown, P extends Principal = P
|
|
|
24
24
|
*
|
|
25
25
|
* @returns Valid principal if authenticated
|
|
26
26
|
* @returns undefined if authentication is valid, but incomplete (multi-step)
|
|
27
|
-
* @throws
|
|
27
|
+
* @throws Error if authentication fails
|
|
28
28
|
*/
|
|
29
29
|
authenticate(payload: T, context?: C): Promise<P | undefined> | P | undefined;
|
|
30
30
|
}
|
package/src/types/error.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RuntimeError, type ErrorCategory } from '@travetto/runtime';
|
|
2
2
|
|
|
3
|
-
export class AuthenticationError<T = Record<string, unknown> | undefined> extends
|
|
3
|
+
export class AuthenticationError<T = Record<string, unknown> | undefined> extends RuntimeError<T> {
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
5
5
|
static defaultCategory = 'authentication' as ErrorCategory;
|
|
6
6
|
}
|