kemal_jwt_auth
Version, currently 1.0.02 versions
- 1.0.1latestJun 21, 2019
- 1.0.0not indexedJun 21, 2019
github.com/dscottboggs/kemal-jwt-auth
Drop-in authentication for Kemal using JWTs
Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
kemal_jwt_auth:
github: dscottboggs/kemal-jwt-auth
version: ~> 1.0.0Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Kemal JWT Authentication
Drop-in authentication middleware for Kemal, independent of user model. See example.cr for a full example.
TL;DR:
require "kemal"
require "kemal_jwt_auth"
# you can use your existing users collection data-structure.
require "./my_users"
# Your `MyUsers` must include the `KemalJWTAuth::UsersCollection` module
collection = MyUsers.default_config
add_handler KemalJWTAuth::Handler.new users: collection
get "/test" do |context|
if user = context.current_user?
"Welcome, #{user}!"
else
"no user found"
end
end
Kemal.run
JavaScript companion
There is a JavaScript companion library to make using this library with an SPA or other JavaScript client a cinch. See the client repository for more information
Installation
-
Add the dependency to your
shard.yml:dependencies: kemal_jwt_auth: github: dscottboggs/kemal_jwt_auth version: ~> 1.0 -
Run
shards install
Contributing
- Fork it (https://github.com/dscottboggs/kemal_jwt_auth/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- D. Scott Boggs - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Jun 21, 2019
- Commit
07a78f2689c8- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/dscottboggs/kemal-jwt-auth
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 2