You need to include the authorization header in the request to the REST API
as such you can't invoke it by opening it in the browser. Try the CURL
example in the docs.
On 1 November 2016 at 10:50, Michael Furman <michael_furman(a)hotmail.com>
wrote:
For example UI for the user management: add user, update user, delete
user.
I can find appropriate REST APIs, but I want to understand how to use it.
------------------------------
*From:* Stian Thorgersen <sthorger(a)redhat.com>
*Sent:* Tuesday, November 1, 2016 11:09 AM
*To:* Michael Furman
*Cc:* keycloak-user(a)lists.jboss.org
*Subject:* Re: [keycloak-user] Creating the UI using REST API
UI for what?
On 31 October 2016 at 09:41, Michael Furman <michael_furman(a)hotmail.com>
wrote:
> Hi all,
> We need to create our own UI using REST API.
> I have authenticated a user in UI (
http://localhost:8080/auth/ad
> min/master/console/#/realms/master ) and then I have tried to open some
> REST API from a browser in the new tab (for example
>
http://localhost:8080/auth/admin/realms/master/clients).
>
> Unfortunately I get HTTP 401 barrier error.
> I see that I need the barrier token if I access REST API from the command
> line:
https://keycloak.gitbooks.io/server-developer-guide/content/
> v/2.2/topics/admin-rest-api.html
>
> What UI should do to access REST API?
> Also to allocate the barrier token and then to access REST API?
> Do you have any JS lib that make the process easier?
> Thank you in advance for your help.
> Best regards,
> Michael
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
>