@mitumba/sdk 5.1.0 → 5.2.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/dist/index.d.mts +107 -1
- package/dist/index.d.ts +107 -1
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -751,6 +751,43 @@ var OAuthModule = class {
|
|
|
751
751
|
});
|
|
752
752
|
return result;
|
|
753
753
|
}
|
|
754
|
+
/**
|
|
755
|
+
* Fetch the OpenID Connect discovery document.
|
|
756
|
+
*
|
|
757
|
+
* A relying party reads this to learn the provider's endpoints and capabilities (issuer, the
|
|
758
|
+
* authorize/token/userinfo/jwks URLs, supported scopes, signing algorithms) rather than hard-
|
|
759
|
+
* coding them. Public — no session required.
|
|
760
|
+
*
|
|
761
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
762
|
+
* @returns The discovery metadata
|
|
763
|
+
*/
|
|
764
|
+
async discover(options) {
|
|
765
|
+
return this.client.get("/auth/oauth/openid-configuration", void 0, options);
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Fetch the JWKS — the public keys that verify provider-issued id_token signatures.
|
|
769
|
+
*
|
|
770
|
+
* A relying party uses these (matched by the id_token header `kid`) to verify an id_token without
|
|
771
|
+
* a shared secret. Public — no session required. Serves public key parameters only.
|
|
772
|
+
*
|
|
773
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
774
|
+
* @returns The JWKS document
|
|
775
|
+
*/
|
|
776
|
+
async getJwks(options) {
|
|
777
|
+
return this.client.get("/auth/oauth/jwks.json", void 0, options);
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Fetch the userinfo claim set for the current session.
|
|
781
|
+
*
|
|
782
|
+
* Returns `sub` plus the identity claims the session's granted scopes allow. Requires an
|
|
783
|
+
* authenticated session — the SDK attaches the bearer token automatically.
|
|
784
|
+
*
|
|
785
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
786
|
+
* @returns The userinfo claims
|
|
787
|
+
*/
|
|
788
|
+
async userinfo(options) {
|
|
789
|
+
return this.client.get("/auth/oauth/userinfo", void 0, options);
|
|
790
|
+
}
|
|
754
791
|
};
|
|
755
792
|
|
|
756
793
|
// src/modules/listings.ts
|