org.oauth3 -> oauth3.org

This commit is contained in:
aj 2017-08-15 20:21:54 +00:00
parent b60e9b8fce
commit 4d80074046
5 changed files with 10 additions and 10 deletions

View File

@ -131,8 +131,8 @@ parseArgs(process.argv, {
// authn / authz // authn / authz
, [ 'devices', 'manages devices for your account(s)' ] , [ 'devices', 'manages devices for your account(s)' ]
, [ 'devices:new', 'create a new device (default name is hostname, default ip is the result of :provider/api/org.oauth3.tunnel/checkip)'.replace(/\b:provider\b/, defaults.provider) ] , [ 'devices:new', 'create a new device (default name is hostname, default ip is the result of :provider/api/tunnel@oauth3.org/checkip)'.replace(/\b:provider\b/, defaults.provider) ]
, [ 'devices:set', 'set the ip address of the device (defaults ip is the result of :provider/api/org.oauth3.tunnel/checkip)'.replace(/\b:provider\b/, defaults.provider) ] , [ 'devices:set', 'set the ip address of the device (defaults ip is the result of :provider/api/tunnel@oauth3.org/checkip)'.replace(/\b:provider\b/, defaults.provider) ]
, [ 'devices:attach', "attach a device to a domain's DNS record" ] , [ 'devices:attach', "attach a device to a domain's DNS record" ]
, [ 'devices:detach', "detach an account from a domain's DNS record" ] , [ 'devices:detach', "detach an account from a domain's DNS record" ]
, [ 'devices:select', '(re)claim the specified device as this device (i.e. you re-installed your OS or deleted your ~/.oauth3)' ] , [ 'devices:select', '(re)claim the specified device as this device (i.e. you re-installed your OS or deleted your ~/.oauth3)' ]

View File

@ -328,7 +328,7 @@
// Example Implicit Grant Request // Example Implicit Grant Request
// (for generating a browser-only session, not a session on your server) // (for generating a browser-only session, not a session on your server)
// //
// GET https://example.com/api/org.oauth3.provider/authorization_dialog // GET https://example.com/api/issuer@oauth3.org/authorization_dialog
// ?response_type=token // ?response_type=token
// &scope=`encodeURIComponent('profile.login profile.email')` // &scope=`encodeURIComponent('profile.login profile.email')`
// &state=`cryptoutil.random().toString('hex')` // &state=`cryptoutil.random().toString('hex')`
@ -1210,7 +1210,7 @@
, _resourceProviderUri: null , _resourceProviderUri: null
, _identityProviderDirectives: null , _identityProviderDirectives: null
, _resourceProviderDirectives: null , _resourceProviderDirectives: null
//, _resourceProviderMap: null // map between xyz.com and org.oauth3.domains //, _resourceProviderMap: null // map between xyz.com and domains@oauth3.org
, _init: function (location, opts) { , _init: function (location, opts) {
var me = this; var me = this;
if (location) { if (location) {
@ -1266,7 +1266,7 @@
var me = this; var me = this;
return me.init().then(function () { return me.init().then(function () {
return me.setIdentityProvider(providerUri).then(function () { return me.setIdentityProvider(providerUri).then(function () {
// TODO how to say "Use xyz.com for org.oauth3.domains, but abc.com for org.oauth3.dns"? // TODO how to say "Use xyz.com for domains@oauth3.org, but abc.com for dns@oauth3.org"?
return me.setResourceProvider(providerUri); return me.setResourceProvider(providerUri);
}); });
}); });

View File

@ -97,7 +97,7 @@
resolve(); resolve();
} }
}; };
script.src = '/assets/org.oauth3/oauth3.crypto.fallback.js'; script.src = '/assets/oauth3.org/oauth3.crypto.fallback.js';
body.appendChild(script); body.appendChild(script);
}); });
return prom; return prom;

View File

@ -97,7 +97,7 @@ OAUTH3.urls.resourceOwnerPassword = function (directive, opts) {
// Example Resource Owner Password Request // Example Resource Owner Password Request
// (generally for 1st party and direct-partner mobile apps, and webapps) // (generally for 1st party and direct-partner mobile apps, and webapps)
// //
// POST https://example.com/api/org.oauth3.provider/access_token // POST https://example.com/api/issuer@oauth3.org/access_token
// { "grant_type": "password", "client_id": "<<id>>", "scope": "<<scope>>" // { "grant_type": "password", "client_id": "<<id>>", "scope": "<<scope>>"
// , "username": "<<username>>", "password": "password" } // , "username": "<<username>>", "password": "password" }
// //
@ -569,7 +569,7 @@ OAUTH3.requests.accounts = {};
OAUTH3.requests.accounts.update = function (directive, session, opts) { OAUTH3.requests.accounts.update = function (directive, session, opts) {
var dir = directive.update_account || { var dir = directive.update_account || {
method: 'POST' method: 'POST'
, url: OAUTH3.url.normalize(directive.api) + '/api/org.oauth3.provider/accounts/:accountId' , url: OAUTH3.url.normalize(directive.api) + '/api/issuer@oauth3.org/accounts/:accountId'
, bearer: 'Bearer' , bearer: 'Bearer'
}; };
var url = dir.url var url = dir.url
@ -593,7 +593,7 @@ OAUTH3.requests.accounts.update = function (directive, session, opts) {
OAUTH3.requests.accounts.create = function (directive, session, account) { OAUTH3.requests.accounts.create = function (directive, session, account) {
var dir = directive.create_account || { var dir = directive.create_account || {
method: 'POST' method: 'POST'
, url: OAUTH3.url.normalize(directive.api) + '/api/org.oauth3.provider/accounts' , url: OAUTH3.url.normalize(directive.api) + '/api/issuer@oauth3.org/accounts'
, bearer: 'Bearer' , bearer: 'Bearer'
}; };
var data = { var data = {

View File

@ -9,7 +9,7 @@ OAUTH3.api['tunnel.token'] = function (providerUri, opts) {
return OAUTH3.request({ return OAUTH3.request({
method: 'POST' method: 'POST'
, url: OAUTH3.url.normalize(providerUri) , url: OAUTH3.url.normalize(providerUri)
+ '/api/org.oauth3.tunnel/accounts/' + session.token.sub + '/token' + '/api/tunnel@oauth3.org/accounts/' + session.token.sub + '/token'
, session: session , session: session
, data: { , data: {
domains: opts.data.domains domains: opts.data.domains