oauth2.js 626 B

1234567891011121314151617
  1. layout.addReady(function(){
  2. (function(layout){
  3. var uri = new URI(window.location.href);
  4. var _load = function(){
  5. var host = o2.Actions.getHost("x_organization_assemble_authentication");
  6. var url = host+"/x_organization_assemble_authentication/jaxrs/oauth/auth";
  7. var toUri = new URI(o2.filterUrl(url));
  8. toUri.setData(uri.getData());
  9. toUri.go();
  10. };
  11. var p = (layout.session && layout.session.user) || layout.sessionPromise;
  12. Promise.resolve(p).then(function(){
  13. _load();
  14. },function(){});
  15. })(layout);
  16. });