straight-shoota / openid_connect

OpenID Connect implementation for Crystal
MIT License
4 stars 0 forks source link

How to use it in a kemal webservice with keycloak? #1

Open 4ndyfix opened 1 month ago

4ndyfix commented 1 month ago

Is it possible? Are there any examples available?

straight-shoota commented 1 month ago

There's an example for SSO via keycloak in https://github.com/straight-shoota/openid_connect/blob/master/examples/sso.cr

4ndyfix commented 1 month ago

Thanks for your fast answer. sso.cr uses a simple HTTP::Server that takes the auth_handler. But how can this be done with kemal?

straight-shoota commented 1 month ago

You can add middleware handlers in Kemal as well: https://kemalcr.com/guide/#middleware