keycloak-scim/examples/js/index.html

25 lines
443 B
HTML
Raw Normal View History

2013-10-08 16:36:29 +00:00
<!DOCTYPE html>
<html>
<head>
<script src="keycloak.js"></script>
</head>
<body>
<script>
keycloak.init({
clientId : 'test-app',
clientSecret : 'password',
baseUrl : 'http://localhost:8081/auth-server',
2013-10-08 16:36:29 +00:00
realm : 'test'
});
if (keycloak.authenticated) {
document.write('User: ' + keycloak.user);
} else {
document.write('<a href="#" id="login" onclick="keycloak.login()">Login</a>');
}
</script>
</body>
</html>