Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 291bfd6a79 | |||
| def91fb60d | |||
| 738573a79c | |||
| 58f245f90c |
10
README.md
10
README.md
@ -58,13 +58,13 @@ If you have no idea what you're doing
|
|||||||
`app.js`:
|
`app.js`:
|
||||||
```js
|
```js
|
||||||
var OAUTH3 = window.OAUTH3;
|
var OAUTH3 = window.OAUTH3;
|
||||||
var auth = OAUTH3.create(window.location); // use window.location to set Client URI (your app's id)
|
var oauth3 = OAUTH3.create(window.location); // use window.location to set Client URI (your app's id)
|
||||||
|
|
||||||
|
|
||||||
// this is any OAuth3-compatible provider, such as oauth3.org
|
// this is any OAuth3-compatible provider, such as oauth3.org
|
||||||
// in v1.1.0 we'll add backwards compatibility for facebook.com, google.com, etc
|
// in v1.1.0 we'll add backwards compatibility for facebook.com, google.com, etc
|
||||||
//
|
//
|
||||||
function onChangeProvider(_providerUri) {
|
function onChangeProvider(providerUri) {
|
||||||
// example https://oauth3.org
|
// example https://oauth3.org
|
||||||
return oauth3.setIdentityProvider(providerUri);
|
return oauth3.setIdentityProvider(providerUri);
|
||||||
}
|
}
|
||||||
@ -86,11 +86,13 @@ function onClickLogin() {
|
|||||||
console.info('Secure PPID (aka subject):', session.token.sub);
|
console.info('Secure PPID (aka subject):', session.token.sub);
|
||||||
|
|
||||||
return oauth3.request({
|
return oauth3.request({
|
||||||
url: 'https://oauth3.org/api/issuer@oauth3.org/inspect'
|
url: 'https://api.oauth3.org/api/issuer@oauth3.org/jwks/:sub/:kid'
|
||||||
|
.replace(/:sub/g, session.token.sub)
|
||||||
|
.replace(/:kid/g, session.token.kid || session.token.iss)
|
||||||
, session: session
|
, session: session
|
||||||
}).then(function (resp) {
|
}).then(function (resp) {
|
||||||
|
|
||||||
console.info("Inspect Token:");
|
console.info("Signing Public Key JWK:");
|
||||||
console.log(resp.data);
|
console.log(resp.data);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user