@relyper/sp-auth 0.1.0 → 0.4.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 +216 -69
- package/dist/client.d.ts +33 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +57 -4
- package/dist/client.js.map +1 -1
- package/dist/coins.d.ts +139 -0
- package/dist/coins.d.ts.map +1 -0
- package/dist/coins.js +210 -0
- package/dist/coins.js.map +1 -0
- package/dist/oidc/claims.d.ts +4 -0
- package/dist/oidc/claims.d.ts.map +1 -0
- package/dist/oidc/claims.js +50 -0
- package/dist/oidc/claims.js.map +1 -0
- package/dist/oidc/client.d.ts +44 -0
- package/dist/oidc/client.d.ts.map +1 -0
- package/dist/oidc/client.js +340 -0
- package/dist/oidc/client.js.map +1 -0
- package/dist/oidc/discovery.d.ts +15 -0
- package/dist/oidc/discovery.d.ts.map +1 -0
- package/dist/oidc/discovery.js +90 -0
- package/dist/oidc/discovery.js.map +1 -0
- package/dist/oidc/pkce.d.ts +6 -0
- package/dist/oidc/pkce.d.ts.map +1 -0
- package/dist/oidc/pkce.js +26 -0
- package/dist/oidc/pkce.js.map +1 -0
- package/dist/oidc/session.d.ts +47 -0
- package/dist/oidc/session.d.ts.map +1 -0
- package/dist/oidc/session.js +119 -0
- package/dist/oidc/session.js.map +1 -0
- package/dist/oidc/types.d.ts +130 -0
- package/dist/oidc/types.d.ts.map +1 -0
- package/dist/oidc/types.js +17 -0
- package/dist/oidc/types.js.map +1 -0
- package/dist/oidc-fastify.d.ts +123 -0
- package/dist/oidc-fastify.d.ts.map +1 -0
- package/dist/oidc-fastify.js +264 -0
- package/dist/oidc-fastify.js.map +1 -0
- package/dist/oidc.d.ts +15 -0
- package/dist/oidc.d.ts.map +1 -0
- package/dist/oidc.js +14 -0
- package/dist/oidc.js.map +1 -0
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +25 -5
|
@@ -0,0 +1 @@
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,GAAG;IAChC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uDAAuD;IACvD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACvD,0CAA0C;IAC1C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC;IAC9E;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACjE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAkIzF"}
|
package/dist/coins.js
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client for the Relyper Coins integration API.
|
|
3
|
+
*
|
|
4
|
+
* Relyper Coins are held centrally: the wallet at the identity provider is the
|
|
5
|
+
* single source of truth for what a user can spend across every Relyper product.
|
|
6
|
+
* A service provider therefore never keeps its own balance -- it asks, and it
|
|
7
|
+
* debits, and anything it stores locally is a mirror for its own reporting.
|
|
8
|
+
*
|
|
9
|
+
* The service provider authenticates with the same client ID and secret it uses
|
|
10
|
+
* for the OIDC login, so every debit is attributable to one registered client
|
|
11
|
+
* and an operator can allow or refuse coin spending per app.
|
|
12
|
+
*/
|
|
13
|
+
export class RelyperCoinsError extends Error {
|
|
14
|
+
code;
|
|
15
|
+
status;
|
|
16
|
+
/** Present on insufficient_funds. */
|
|
17
|
+
balanceRc;
|
|
18
|
+
requestedRc;
|
|
19
|
+
cause;
|
|
20
|
+
/**
|
|
21
|
+
* What the service actually answered, and where it was asked.
|
|
22
|
+
*
|
|
23
|
+
* Kept because a status code alone does not identify a cause: a 403 from the
|
|
24
|
+
* coins service and a 403 from a proxy in front of it are the same number and
|
|
25
|
+
* mean entirely different things. Without the body, an operator holding a
|
|
26
|
+
* correctly configured client has nothing to go on but a message this library
|
|
27
|
+
* guessed. `responseError` is the service's own error code when it sent one.
|
|
28
|
+
*/
|
|
29
|
+
url;
|
|
30
|
+
responseError;
|
|
31
|
+
responseBody;
|
|
32
|
+
constructor(code, message, options = {}) {
|
|
33
|
+
super(message);
|
|
34
|
+
this.name = 'RelyperCoinsError';
|
|
35
|
+
this.code = code;
|
|
36
|
+
this.status = options.status ?? 502;
|
|
37
|
+
this.balanceRc = options.balanceRc;
|
|
38
|
+
this.requestedRc = options.requestedRc;
|
|
39
|
+
this.cause = options.cause;
|
|
40
|
+
this.url = options.url;
|
|
41
|
+
this.responseError = options.responseError;
|
|
42
|
+
this.responseBody = options.responseBody;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Derives the coins API base URL from an OIDC issuer.
|
|
47
|
+
*
|
|
48
|
+
* The Relyper IdP publishes OIDC at the issuer root but mounts its regular API
|
|
49
|
+
* under `/api`, so the two differ by exactly that segment.
|
|
50
|
+
*/
|
|
51
|
+
export function coinsBaseUrlFromIssuer(issuer) {
|
|
52
|
+
const trimmed = trimTrailingSlashes(issuer);
|
|
53
|
+
return trimmed.endsWith('/api') ? trimmed : trimmed + '/api';
|
|
54
|
+
}
|
|
55
|
+
export function createRelyperCoinsClient(options) {
|
|
56
|
+
for (const key of ['baseUrl', 'clientId', 'clientSecret']) {
|
|
57
|
+
if (!options[key] || typeof options[key] !== 'string') {
|
|
58
|
+
throw new TypeError('@relyper/sp-auth/coins: ' + key + ' is required.');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const doFetch = options.fetch ?? globalThis.fetch;
|
|
62
|
+
if (typeof doFetch !== 'function') {
|
|
63
|
+
throw new TypeError('@relyper/sp-auth/coins: no fetch implementation available.');
|
|
64
|
+
}
|
|
65
|
+
const baseUrl = trimTrailingSlashes(options.baseUrl);
|
|
66
|
+
const timeout = options.requestTimeoutMs ?? 10_000;
|
|
67
|
+
// RFC 6749 section 2.3.1: both halves are form-urlencoded before the base64.
|
|
68
|
+
const authorization = 'Basic ' + Buffer.from(encodeURIComponent(options.clientId) + ':' + encodeURIComponent(options.clientSecret), 'utf8').toString('base64');
|
|
69
|
+
async function call(path, init) {
|
|
70
|
+
const url = baseUrl + path;
|
|
71
|
+
let response;
|
|
72
|
+
try {
|
|
73
|
+
response = await doFetch(url, {
|
|
74
|
+
method: init.method,
|
|
75
|
+
headers: {
|
|
76
|
+
authorization,
|
|
77
|
+
accept: 'application/json',
|
|
78
|
+
...(init.body === undefined ? {} : { 'content-type': 'application/json' })
|
|
79
|
+
},
|
|
80
|
+
body: init.body === undefined ? undefined : JSON.stringify(init.body),
|
|
81
|
+
signal: AbortSignal.timeout(timeout)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
catch (cause) {
|
|
85
|
+
throw new RelyperCoinsError('unavailable', 'The Relyper coin service could not be reached.', { cause });
|
|
86
|
+
}
|
|
87
|
+
const { payload, raw } = await readBody(response);
|
|
88
|
+
if (response.ok)
|
|
89
|
+
return payload ?? {};
|
|
90
|
+
const error = typeof payload?.error === 'string' ? payload.error : '';
|
|
91
|
+
// Passed to every throw below so the caller can log what was actually
|
|
92
|
+
// answered instead of only what this library concluded from it.
|
|
93
|
+
const evidence = { url, responseError: error || undefined, responseBody: raw || undefined };
|
|
94
|
+
if (response.status === 402 || error === 'insufficient_funds') {
|
|
95
|
+
throw new RelyperCoinsError('insufficient_funds', 'Not enough Relyper Coins.', {
|
|
96
|
+
status: 402,
|
|
97
|
+
balanceRc: numberOrUndefined(payload?.balanceRc),
|
|
98
|
+
requestedRc: numberOrUndefined(payload?.requestedRc),
|
|
99
|
+
...evidence
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Only the service's own error code identifies this cause. A bare 403 is
|
|
103
|
+
// not evidence of it: an unmatched route, a gateway or a WAF in front of
|
|
104
|
+
// the service answers with the same status, and reporting those as a
|
|
105
|
+
// permission the operator has already granted sends them looking in the
|
|
106
|
+
// wrong place.
|
|
107
|
+
if (error === 'coins_not_enabled_for_client') {
|
|
108
|
+
throw new RelyperCoinsError('coins_not_enabled', 'This application is not allowed to spend Relyper Coins.', {
|
|
109
|
+
status: response.status,
|
|
110
|
+
...evidence
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (response.status === 401) {
|
|
114
|
+
throw new RelyperCoinsError('unauthorized', 'The Relyper coin service rejected this application.', {
|
|
115
|
+
status: 401,
|
|
116
|
+
...evidence
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (response.status === 403) {
|
|
120
|
+
throw new RelyperCoinsError('forbidden', 'The Relyper coin service refused this request with 403.', {
|
|
121
|
+
status: 403,
|
|
122
|
+
...evidence
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
if (response.status === 400) {
|
|
126
|
+
throw new RelyperCoinsError('invalid_request', 'The coin request was rejected as invalid.', {
|
|
127
|
+
status: 400,
|
|
128
|
+
...evidence
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
throw new RelyperCoinsError('unavailable', 'The Relyper coin service answered unexpectedly.', {
|
|
132
|
+
...evidence,
|
|
133
|
+
status: response.status
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function walletPath(subject) {
|
|
137
|
+
if (!subject)
|
|
138
|
+
throw new TypeError('@relyper/sp-auth/coins: subject is required.');
|
|
139
|
+
return '/integrations/coins/user/' + encodeURIComponent(subject);
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
async getWallet(subject) {
|
|
143
|
+
return (await call(walletPath(subject), { method: 'GET' }));
|
|
144
|
+
},
|
|
145
|
+
async getLedger(subject, limit = 50) {
|
|
146
|
+
const payload = await call(walletPath(subject) + '/ledger?limit=' + encodeURIComponent(String(limit)), {
|
|
147
|
+
method: 'GET'
|
|
148
|
+
});
|
|
149
|
+
return Array.isArray(payload?.items) ? payload.items : [];
|
|
150
|
+
},
|
|
151
|
+
async debit(input) {
|
|
152
|
+
if (!(input.amountRc > 0)) {
|
|
153
|
+
throw new TypeError('@relyper/sp-auth/coins: amountRc must be greater than zero.');
|
|
154
|
+
}
|
|
155
|
+
const payload = await call(walletPath(input.subject) + '/debit', {
|
|
156
|
+
method: 'POST',
|
|
157
|
+
body: {
|
|
158
|
+
amountRc: input.amountRc,
|
|
159
|
+
reason: input.reason,
|
|
160
|
+
idempotencyKey: input.idempotencyKey,
|
|
161
|
+
product: input.product,
|
|
162
|
+
provider: input.provider,
|
|
163
|
+
model: input.model,
|
|
164
|
+
tenantId: input.tenantId,
|
|
165
|
+
meta: input.meta ?? {}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
const { ledgerEntry, dedup, ...wallet } = payload ?? {};
|
|
169
|
+
return {
|
|
170
|
+
wallet: wallet,
|
|
171
|
+
entry: ledgerEntry ?? null,
|
|
172
|
+
deduplicated: dedup === true
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function trimTrailingSlashes(value) {
|
|
178
|
+
let end = value.length;
|
|
179
|
+
while (end > 0 && value[end - 1] === '/')
|
|
180
|
+
end -= 1;
|
|
181
|
+
return value.slice(0, end);
|
|
182
|
+
}
|
|
183
|
+
function numberOrUndefined(value) {
|
|
184
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Reads the body once, as text, and parses JSON from that text.
|
|
188
|
+
*
|
|
189
|
+
* `response.json()` consumes the stream, so a body that is not JSON -- an HTML
|
|
190
|
+
* error page from a gateway, most importantly -- would be lost before anyone
|
|
191
|
+
* could look at it. The raw text is what makes those cases diagnosable, so it
|
|
192
|
+
* is kept and truncated rather than discarded.
|
|
193
|
+
*/
|
|
194
|
+
async function readBody(response) {
|
|
195
|
+
let raw = '';
|
|
196
|
+
try {
|
|
197
|
+
raw = await response.text();
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
return { payload: null, raw: '' };
|
|
201
|
+
}
|
|
202
|
+
const trimmed = raw.length > 500 ? raw.slice(0, 500) + '...' : raw;
|
|
203
|
+
try {
|
|
204
|
+
return { payload: JSON.parse(raw), raw: trimmed };
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return { payload: null, raw: trimmed };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=coins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coins.js","sourceRoot":"","sources":["../src/coins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAsEH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,CAAwB;IAC5B,MAAM,CAAS;IACxB,qCAAqC;IAC5B,SAAS,CAAU;IACnB,WAAW,CAAU;IACrB,KAAK,CAAW;IACzB;;;;;;;;OAQG;IACM,GAAG,CAAU;IACb,aAAa,CAAU;IACvB,YAAY,CAAU;IAE/B,YACE,IAA2B,EAC3B,OAAe,EACf,OAAO,GAQH,EAAE;QAEN,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,GAAG,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CA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AE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACpC,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;IACnE,IAAI,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAwB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IACzC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../src/oidc/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAcnD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAQrD;AAkBD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAcxF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps the claims of a Relyper ID token onto the identity the application sees.
|
|
3
|
+
*
|
|
4
|
+
* The IdP sends tenant information under several names for backwards
|
|
5
|
+
* compatibility (`tenant`, `tenant_id`, `tenant_ids`, `tenants`); this collapses
|
|
6
|
+
* them into one shape so service providers do not each reinvent the reading.
|
|
7
|
+
*/
|
|
8
|
+
function asString(value) {
|
|
9
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
10
|
+
}
|
|
11
|
+
export function asStringList(value) {
|
|
12
|
+
if (Array.isArray(value)) {
|
|
13
|
+
return value.map((item) => asString(item)).filter(Boolean);
|
|
14
|
+
}
|
|
15
|
+
const single = asString(value);
|
|
16
|
+
if (!single)
|
|
17
|
+
return [];
|
|
18
|
+
// Some providers send space- or comma-separated lists in a single claim.
|
|
19
|
+
return single.split(/[\s,]+/).map((item) => item.trim()).filter(Boolean);
|
|
20
|
+
}
|
|
21
|
+
function tenantIdsFrom(claims) {
|
|
22
|
+
const explicit = asStringList(claims.tenant_ids);
|
|
23
|
+
if (explicit.length)
|
|
24
|
+
return explicit;
|
|
25
|
+
const tenants = claims.tenants;
|
|
26
|
+
if (Array.isArray(tenants)) {
|
|
27
|
+
const ids = tenants
|
|
28
|
+
.map((entry) => (entry && typeof entry === 'object' ? asString(entry.tenantId) : ''))
|
|
29
|
+
.filter(Boolean);
|
|
30
|
+
if (ids.length)
|
|
31
|
+
return ids;
|
|
32
|
+
}
|
|
33
|
+
const single = asString(claims.tenant_id) || asString(claims.tenant);
|
|
34
|
+
return single ? [single] : [];
|
|
35
|
+
}
|
|
36
|
+
export function defaultClaimsToIdentity(claims) {
|
|
37
|
+
const email = asString(claims.email);
|
|
38
|
+
const tenantIds = tenantIdsFrom(claims);
|
|
39
|
+
return {
|
|
40
|
+
subject: asString(claims.sub),
|
|
41
|
+
email,
|
|
42
|
+
displayName: asString(claims.name) || asString(claims.preferred_username) || email || 'Relyper User',
|
|
43
|
+
roles: asStringList(claims.roles),
|
|
44
|
+
tenantId: tenantIds[0] ?? null,
|
|
45
|
+
tenantIds,
|
|
46
|
+
tenantName: asString(claims.tenant_name) || null,
|
|
47
|
+
teams: asStringList(claims.teams)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=claims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../src/oidc/claims.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,C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,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,MAA+B;IACrE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAExC,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7B,KAAK;QACL,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,KAAK,IAAI,cAAc;QACpG,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI;QAC9B,SAAS;QACT,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI;QAChD,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RelyperIdentity } from '../types.js';
|
|
2
|
+
import { type OidcDiscoveryDocument, type RelyperAuthorizationRequest, type RelyperLoginResult, type RelyperLoginTransaction, type RelyperOidcOptions, type ResolvedRelyperOidcOptions } from './types.js';
|
|
3
|
+
export type AuthorizationRequestOptions = {
|
|
4
|
+
/** Local path to return to after the login. Anything else falls back to '/'. */
|
|
5
|
+
returnTo?: string;
|
|
6
|
+
/** OIDC `prompt`, e.g. 'login' to force re-authentication. */
|
|
7
|
+
prompt?: string;
|
|
8
|
+
/** OIDC `login_hint`, usually an e-mail address. */
|
|
9
|
+
loginHint?: string;
|
|
10
|
+
};
|
|
11
|
+
export type RelyperOidcClient = {
|
|
12
|
+
readonly options: ResolvedRelyperOidcOptions;
|
|
13
|
+
/** Discovery document, fetched on first use and cached afterwards. */
|
|
14
|
+
discover(): Promise<OidcDiscoveryDocument>;
|
|
15
|
+
/**
|
|
16
|
+
* Starts a login. Returns the IdP URL to redirect to plus the transaction the
|
|
17
|
+
* caller has to hand back to {@link RelyperOidcClient.completeLogin}.
|
|
18
|
+
*/
|
|
19
|
+
createAuthorizationRequest(options?: AuthorizationRequestOptions): Promise<RelyperAuthorizationRequest>;
|
|
20
|
+
/**
|
|
21
|
+
* Completes a login: checks `state`, exchanges the code, verifies the ID token
|
|
22
|
+
* and returns the identity. Throws {@link RelyperOidcError} on every failure.
|
|
23
|
+
*/
|
|
24
|
+
completeLogin(params: {
|
|
25
|
+
query: Record<string, string | string[] | undefined>;
|
|
26
|
+
transaction: RelyperLoginTransaction;
|
|
27
|
+
}): Promise<RelyperLoginResult>;
|
|
28
|
+
/** Role check, identical in semantics to the header-based variant. */
|
|
29
|
+
hasRole(identity: RelyperIdentity, role: string | string[], match?: 'any' | 'all'): boolean;
|
|
30
|
+
/** URL that ends the IdP session, or null if the IdP advertises none. */
|
|
31
|
+
endSessionUrl(options?: {
|
|
32
|
+
idTokenHint?: string;
|
|
33
|
+
postLogoutRedirectUri?: string;
|
|
34
|
+
}): Promise<string | null>;
|
|
35
|
+
};
|
|
36
|
+
export declare function createRelyperOidcClient(options: RelyperOidcOptions): RelyperOidcClient;
|
|
37
|
+
/**
|
|
38
|
+
* Only a local path is ever used as a post-login target. An absolute URL, or a
|
|
39
|
+
* protocol-relative one starting with two slashes, would turn the login route
|
|
40
|
+
* into an open redirect. Backslashes are rejected too, because some browsers
|
|
41
|
+
* normalise them to forward slashes and would follow "/\\evil.example".
|
|
42
|
+
*/
|
|
43
|
+
export declare function safeReturnTo(value: unknown, fallback?: string): string;
|
|
44
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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