Git Product home page Git Product logo

keycloak-gem-demo's Introduction

Gem Keycloak - example

Versions

  • ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
  • Rails 5.1.6
  • gem 'keycloak', '~> 3.0.0'

Description

This is a simple example of how to build an application using gem Keycloak and using the views from your own application.

Step by Step

1. Clone this project $ rails generate active_record:session_migration

$ rake db:migrate

$ vim config/initializers/session_store.rb Rails.application.config.session_store :active_record_store, :key => '_my_app_session'

2. Create a new realm:

Alt text

3. Configure a email to send then "forgot password" email:

Alt text

4. Create a new client in the realm:

Alt text

5. Create a new role in the client:

Alt text

6. Export installation.json file and paste in application folder. The gem will get client information at this file.:

Alt text

7. Install application gems:

$ bundle

8. Create database:

$ rails db:create
$ rails db:migrate

9. Start application:

$ rails s

10. Access application

Alt text

11. See the new user in Keycloak:

Alt text

12. Sign In and access the main screen:

Alt text

Alt text

13. Click in "Logout":

Alt text

In docs folder there are the realm file exported and all images of this documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.