[keycloak-user] HTTP 403 Forbidden on Keycloak.getInstance
Stian Thorgersen
stian at redhat.com
Tue Dec 30 07:31:44 EST 2014
Did you enable 'Direct Grant API' for your realm? If not open the admin console click on the realm -> settings -> login and toggle 'Direct Grant API' to ON
----- Original Message -----
> From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> To: keycloak-user at lists.jboss.org
> Sent: Friday, 19 December, 2014 4:06:56 PM
> Subject: [keycloak-user] HTTP 403 Forbidden on Keycloak.getInstance
>
> Hi,
>
> I have a realm with an application called : examples-admin-client and would
> like to use it to manage my realm but i get an error :
> javax.ws.rs.ClientErrorException: HTTP 403 Forbidden every time i make the
> following call :
>
> Keycloak keycloak = Keycloak.getInstance(authServer, "realm-name", "User1",
> "password", "examples-admin-client",
> "a5890cdf-e1df-40c0-9d50-26ad2f7badde");
>
> When i try to do the same thing with the example realm (i use the json
> example-realm.json provided by the keycloak project) this works nicely
> actually !
>
> Btw, i can successfully login with the user : User1 with that password.
>
> This is the json for my realm :
>
> {
> "realm": "realm-name",
> "realm-public-key":
> "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxwUIE6W3BZYlSxDPpwkknb2ObnrEsGMUJGy3HfNEfkfu9rcY5bxkllLsW32KlR78++xtuI11IE2nuh6nJmUsIKMb55Ez9n7/E9kPmSF6lxavZlQY0HfBnR3ZWgzsoUUz4n7pOhmqHIAGXeuxnMDQ5/upwcolFIZRor1v7oT/H8QIDAQAB",
> "auth-server-url": " http://localhost:8080/auth ",
> "ssl-required": "none",
> "resource": "examples-admin-client",
> "credentials": {
> "secret": "a5890cdf-e1df-40c0-9d50-26ad2f7badde"
> }
> }
>
> Thanks for any help on this one !
>
> _______________________________________________
> 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