Hi Austin,
The token stored in the session storage of the Node.js application is the JWT. If you
program your application to output the stored token and parse it into the jwt.io website,
you will be able to see the actual content of the token. This token is also used as bearer
token.
The only reason to use the token as bearer token is when you wish to get access of cross
origin resources that are protected by your Keycloak instance.
If you want to use your node.js application as your resource server, then configure the
client in Keycloak to be a bearer-only client that accepts only bearer tokens in the HTTP
Authorization header.
Things to do:
• Go to your Keycloak instance and configure your Client’s Access Type to ‘bearer-only’;
• Generate a new Keycloak.json file (docs of this configuration file [1])
• Remove the session store from the Keycloak object initialization [2]
And I believe that’s it.
[1]
https://www.keycloak.org/docs/3.0/securing_apps/topics/oidc/java/java-ada...
[2]
https://www.keycloak.org/docs/3.0/securing_apps/topics/oidc/nodejs-adapte...
Kind regards,
Kevin
--------------------------------------
Van: Austin Cunningham [mailto:aucunnin@redhat.com]
Verzonden: woensdag 19 april 2017 11:02
Aan: Kevin Berendsen <mailto:kevin.berendsen@pharmapartners.nl>
CC: mailto:keycloak-user@lists.jboss.org
Onderwerp: Re: [keycloak-user] Example of npm keycloak-connect with bearer or JWT
Hi Kevin,
Thanks for getting back to me , I have reviewed that example before , it seems to be using
sessions , not bearer or jwt. Correct me if I am wrong I could be missing something. I was
hoping to find an implementation of
http://blog.keycloak.org/2015/10/authentication-of-clients-with-signed.html.
Regards
Austin
On 19 April 2017 at 08:32, Kevin Berendsen
<mailto:kevin.berendsen@pharmapartners.nl> wrote:
Hi Austin,
I believe this example is what you're looking for. [1]
Make sure you read the README carefully.
[1]
https://github.com/keycloak/keycloak-nodejs-connect/tree/master/example
Kind regards,
Kevin
-----Oorspronkelijk bericht-----
Van: mailto:keycloak-user-bounces@lists.jboss.org
[mailto:mailto:keycloak-user-bounces@lists.jboss.org] Namens Austin Cunningham
Verzonden: dinsdag 18 april 2017 16:54
Aan: mailto:keycloak-user@lists.jboss.org
Onderwerp: [keycloak-user] Example of npm keycloak-connect with bearer or JWT
Hi ,
I am looking for an example of JWT or Bearer implemented in Node.js with express js with
Keycloak .
Regards,
Austin
_______________________________________________
keycloak-user mailing list
mailto:mailto:keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
_______________________________________________
keycloak-user mailing list
mailto:keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
AUSTIN CUNNINGHAM
SOFTWARE ENGINEERING INTERN
https://www.redhat.com
Communications House, Cork Road, Waterford X91NY33
Ireland
mailto:aucunnin@redhat.com
https://red.ht/sig