[keycloak-user] ORIGIN for /database/customers

Stian Thorgersen stian at redhat.com
Fri Feb 27 00:57:04 EST 2015


I don't see what's missing here?

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: keycloak-user at lists.jboss.org
> Sent: Thursday, February 26, 2015 6:10:54 PM
> Subject: Re: [keycloak-user] ORIGIN for /database/customers
> 
> We need to provide this functionality in keycloak.js so you don't have
> to do it.
> 
> On 2/26/2015 11:05 AM, Christopher Wallace wrote:
> > I was able to SUCCESSFULLY obtain the JSON user information using the
> > following javascript:
> >   var keycloak = Keycloak('http://localhost:8080/app/keycloak.json');
> >      var loadData = function () {
> >          console.log(keycloak.tokenParsed);
> >      var user = JSON.stringify(keycloak.tokenParsed);
> >          console.log(user);
> >      };
> >
> >      var loadFailure = function () {
> >          console.log('<b>Failed to load data. Check console log</b>');
> >      };
> >
> >      var reloadData = function () {
> >          keycloak.updateToken(10)
> >          .success(loadData)
> >          .error(function() {
> >              console.log('<b>Failed to load data. User is logged
> >              out.</b>');
> >          });
> >      };
> >
> >      keycloak.init({ onLoad: 'login-required' }).success(reloadData);
> > }, null, this);
> >
> > On Thu, Feb 26, 2015 at 10:21 AM, Christopher Wallace
> > <cjwallac at gmail.com <mailto:cjwallac at gmail.com>> wrote:
> >
> >     I am attempted to use the Javascript Adapter I think I have the
> >     javascript correct, but when I go to pu the request to
> >     /database/customers I get:
> >
> >     XMLHttpRequest cannot load http://localhost:8082/database/customers.
> >     No 'Access-Control-Allow-Origin' header is present on the requested
> >     resource. Origin 'http://localhost:8080' is therefore not allowed
> >     access. The response had HTTP status code 405.
> >
> >     I have CORS working for authentication from http://localhost:8080 is
> >     there a different place to allow this origin?
> >     for /database/customers outside of the application inside of the
> >     realm I have defined?
> >
> >     --
> >     Chris Wallace
> >     cjwallac at gmail.com <mailto:cjwallac at gmail.com>
> >
> >
> >
> >
> > --
> > Chris Wallace
> > cjwallac at gmail.com <mailto:cjwallac at gmail.com>
> > c: 570.582.9955
> >
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> >
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
> 


More information about the keycloak-user mailing list