@crossauth/common 0.0.41 → 1.0.1
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/dist/error.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/logger.d.ts +1 -1
- package/dist/oauth/client.d.ts +1 -1
- package/dist/oauth/tokenconsumer.d.ts +2 -2
- package/package.json +1 -1
package/dist/error.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Indicates the type of error reported by {@link CrossauthError}
|
|
2
|
+
* Indicates the type of error reported by {@link @crossauth/common!CrossauthError}
|
|
3
3
|
*/
|
|
4
4
|
export declare enum ErrorCode {
|
|
5
5
|
/** Thrown when a given username does not exist, eg during login */
|
|
@@ -137,7 +137,7 @@ export declare class CrossauthError extends Error {
|
|
|
137
137
|
* OAuth defines certain error types. To convert the error in an OAuth
|
|
138
138
|
* response into a CrossauthError object, call this function.
|
|
139
139
|
*
|
|
140
|
-
* @param error as returned by an OAuth call (converted to an {@link ErrorCode}).
|
|
140
|
+
* @param error as returned by an OAuth call (converted to an {@link @crossauth/common!ErrorCode}).
|
|
141
141
|
* @param error_description as returned by an OAuth call (put in the `message`)
|
|
142
142
|
* @returns a `CrossauthError` instance.
|
|
143
143
|
*/
|
|
@@ -148,7 +148,7 @@ export declare class CrossauthError extends Error {
|
|
|
148
148
|
* it.
|
|
149
149
|
* If not and it is an object with `errorCode` in it, creates a
|
|
150
150
|
* CrossauthError from that and `errorMessage`, if present.
|
|
151
|
-
* Otherwise creates a `CrossauthError` object with {@link ErrorCode}
|
|
151
|
+
* Otherwise creates a `CrossauthError` object with {@link @crossauth/common!ErrorCode}
|
|
152
152
|
* of `Unknown` from it, setting the `message` if possible.
|
|
153
153
|
*
|
|
154
154
|
* @param e the error to convert.
|
package/dist/index.js
CHANGED
|
@@ -96,7 +96,7 @@ class g extends Error {
|
|
|
96
96
|
* OAuth defines certain error types. To convert the error in an OAuth
|
|
97
97
|
* response into a CrossauthError object, call this function.
|
|
98
98
|
*
|
|
99
|
-
* @param error as returned by an OAuth call (converted to an {@link ErrorCode}).
|
|
99
|
+
* @param error as returned by an OAuth call (converted to an {@link @crossauth/common!ErrorCode}).
|
|
100
100
|
* @param error_description as returned by an OAuth call (put in the `message`)
|
|
101
101
|
* @returns a `CrossauthError` instance.
|
|
102
102
|
*/
|
|
@@ -180,7 +180,7 @@ class g extends Error {
|
|
|
180
180
|
* it.
|
|
181
181
|
* If not and it is an object with `errorCode` in it, creates a
|
|
182
182
|
* CrossauthError from that and `errorMessage`, if present.
|
|
183
|
-
* Otherwise creates a `CrossauthError` object with {@link ErrorCode}
|
|
183
|
+
* Otherwise creates a `CrossauthError` object with {@link @crossauth/common!ErrorCode}
|
|
184
184
|
* of `Unknown` from it, setting the `message` if possible.
|
|
185
185
|
*
|
|
186
186
|
* @param e the error to convert.
|
|
@@ -1137,7 +1137,7 @@ class qe {
|
|
|
1137
1137
|
* Otherwise, performs a fetch by appending
|
|
1138
1138
|
* `/.well-known/openid-configuration` to the
|
|
1139
1139
|
* `authServerBaseUrl`.
|
|
1140
|
-
* @throws {@link CrossauthError} with the following {@link ErrorCode}s
|
|
1140
|
+
* @throws {@link @crossauth/common!CrossauthError} with the following {@link @crossauth/common!ErrorCode}s
|
|
1141
1141
|
* - `Connection` if data from the URL could not be fetched or parsed.
|
|
1142
1142
|
*/
|
|
1143
1143
|
async loadConfig(t) {
|
|
@@ -1949,7 +1949,7 @@ class Me {
|
|
|
1949
1949
|
* to `authServerBaseUrl` )
|
|
1950
1950
|
* @param oidcConfig the configuration, or undefined to load it from
|
|
1951
1951
|
* the authorization server
|
|
1952
|
-
* @throws a {@link CrossauthError} object with {@link ErrorCode} of
|
|
1952
|
+
* @throws a {@link @crossauth/common!CrossauthError} object with {@link @crossauth/common!ErrorCode} of
|
|
1953
1953
|
* - `Connection` if the fetch to the authorization server failed.
|
|
1954
1954
|
*/
|
|
1955
1955
|
async loadConfig(t) {
|
|
@@ -1982,7 +1982,7 @@ class Me {
|
|
|
1982
1982
|
* authorization server (using the URL in the OIDC configuration).
|
|
1983
1983
|
* @param jwks the keys to load, or undefined to fetch them from
|
|
1984
1984
|
* the authorization server.
|
|
1985
|
-
* @throws a {@link CrossauthError} object with {@link ErrorCode} of
|
|
1985
|
+
* @throws a {@link @crossauth/common!CrossauthError} object with {@link @crossauth/common!ErrorCode} of
|
|
1986
1986
|
* - `Connection` if the fetch to the authorization server failed,
|
|
1987
1987
|
* the OIDC configuration wasn't set or the keys could not be parsed.
|
|
1988
1988
|
*/
|
package/dist/logger.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface CrossauthLoggerInterface {
|
|
|
30
30
|
*
|
|
31
31
|
* - `msg` : main contents of the log
|
|
32
32
|
* - `err` : an error object. If a subclass of Error, it wil contain at least `message` and
|
|
33
|
-
* a stack trace in `stack`. If the error is of type{@link CrossauthError}
|
|
33
|
+
* a stack trace in `stack`. If the error is of type {@link @crossauth/common!CrossauthError}
|
|
34
34
|
* it also will also contain `code` and `httpStatus`.
|
|
35
35
|
* - `hashedSessionCookie` : for security reasons, session cookies are not included in logs.
|
|
36
36
|
* However, so that errors can be correlated with each other, a hash
|
package/dist/oauth/client.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export declare abstract class OAuthClientBase {
|
|
|
202
202
|
* Otherwise, performs a fetch by appending
|
|
203
203
|
* `/.well-known/openid-configuration` to the
|
|
204
204
|
* `authServerBaseUrl`.
|
|
205
|
-
* @throws {@link CrossauthError} with the following {@link ErrorCode}s
|
|
205
|
+
* @throws {@link @crossauth/common!CrossauthError} with the following {@link @crossauth/common!ErrorCode}s
|
|
206
206
|
* - `Connection` if data from the URL could not be fetched or parsed.
|
|
207
207
|
*/
|
|
208
208
|
loadConfig(oidcConfig?: OpenIdConfiguration): Promise<void>;
|
|
@@ -79,7 +79,7 @@ export declare abstract class OAuthTokenConsumerBase {
|
|
|
79
79
|
* to `authServerBaseUrl` )
|
|
80
80
|
* @param oidcConfig the configuration, or undefined to load it from
|
|
81
81
|
* the authorization server
|
|
82
|
-
* @throws a {@link CrossauthError} object with {@link ErrorCode} of
|
|
82
|
+
* @throws a {@link @crossauth/common!CrossauthError} object with {@link @crossauth/common!ErrorCode} of
|
|
83
83
|
* - `Connection` if the fetch to the authorization server failed.
|
|
84
84
|
*/
|
|
85
85
|
loadConfig(oidcConfig?: OpenIdConfiguration): Promise<void>;
|
|
@@ -88,7 +88,7 @@ export declare abstract class OAuthTokenConsumerBase {
|
|
|
88
88
|
* authorization server (using the URL in the OIDC configuration).
|
|
89
89
|
* @param jwks the keys to load, or undefined to fetch them from
|
|
90
90
|
* the authorization server.
|
|
91
|
-
* @throws a {@link CrossauthError} object with {@link ErrorCode} of
|
|
91
|
+
* @throws a {@link @crossauth/common!CrossauthError} object with {@link @crossauth/common!ErrorCode} of
|
|
92
92
|
* - `Connection` if the fetch to the authorization server failed,
|
|
93
93
|
* the OIDC configuration wasn't set or the keys could not be parsed.
|
|
94
94
|
*/
|