[keycloak-dev] /tokens/access/codes now uses Basic Auth

Stian Thorgersen stian at redhat.com
Fri Feb 21 05:52:23 EST 2014



----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: keycloak-dev at lists.jboss.org
> Sent: Thursday, 20 February, 2014 10:26:05 PM
> Subject: [keycloak-dev] /tokens/access/codes now uses Basic Auth
> 
> Since we're using client secret now to authenticate clients, I changed
> the protocol to use Basic Auth as per the OAuth and OpenId Connect
> specs.  I updated the javascript adapter to use basic auth (I think),
> but I don't have an app to test against.

Checked and it works fine. 

I added customer-portal-js to example, but didn't get around to updating docs on how to deploy it. Currently you need to edit the html to set the realm, clientId and clientSecret before deploying.

What I've used to test it with is:

<html>
<head>
    <script src="keycloak.js"></script>
</head>
<body>
<button onclick="keycloak.login()">Login</button>

<script>
    var keycloak = Keycloak({ realm: 'test', clientId: 'test', clientSecret: '17c72dd3-a26c-40e7-91a3-cbbb1636789c' });

    keycloak.init(function () {
        console.debug('Token: ' + keycloak.tokenParsed);
        console.debug('Realm access: ' + keycloak.realmAccess);
        console.debug('Resource access: ' + keycloak.resourceAccess);

        keycloak.loadUserProfile(function (profile) {
            console.debug(profile);
        }, function (error) {
            console.debug(error);
        })
    });
</script>
</body>
</html>


> 
> 
> P.S.
> 
> I hear Marek laughing and/or cursing at me in the background...
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list