Compare commits

...

4 Commits

Author SHA1 Message Date
291bfd6a79 retrieve signing key 2018-07-06 08:12:13 +00:00
def91fb60d fix url for validating token 2018-07-06 07:51:39 +00:00
738573a79c typo fix _providerUri => providerUri 2018-07-06 05:56:01 +00:00
58f245f90c typo auth => oauth3 2018-07-06 05:48:25 +00:00

View File

@ -58,13 +58,13 @@ If you have no idea what you're doing
`app.js`:
```js
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
// 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
return oauth3.setIdentityProvider(providerUri);
}
@ -86,11 +86,13 @@ function onClickLogin() {
console.info('Secure PPID (aka subject):', session.token.sub);
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
}).then(function (resp) {
console.info("Inspect Token:");
console.info("Signing Public Key JWK:");
console.log(resp.data);
});