Skip to content

Commit

Permalink
Enhance Authly configuration examples
Browse files Browse the repository at this point in the history
Updated the Authly configuration in the README for better clarity and setup. Revised time-to-live settings to use more readable time formats and changed the instantiation method for `owners` and `clients` to improve example accuracy. Added examples for the new `algorithm` and `token_strategy` settings to guide users on utilizing JWT tokens effectively. These changes aim to provide a more comprehensive configuration reference.
  • Loading branch information
eliasjpr committed Oct 10, 2024
1 parent 918e8cc commit fafab12
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ Authly.configure do |config|
config.issuer = "https://your-app.com"
config.secret_key = ENV["AUTHLY_SECRET_KEY"] # Ensure you keep this key secure
config.public_key = ENV["AUTHLY_PUBLIC_KEY"]
config.token_ttl[:access] = 3600 # Token Time-to-Live in seconds
config.owners = [CustomAuthorizableOwner]
config.clients = [CustomAuthorizableClient]
config.refresh_ttl = 1.day # Token Time-to-Live in seconds
config.code_ttl = 5.minutes
config.access_ttl =1.hour
config.owners = CustomAuthorizableOwner.new
config.clients = CustomAuthorizableClient.new
config.token_store = CustomTokenStore.new
config.algorithm = JWT::Algorithm::HS256
config.token_strategy = :jwt
end
```

Expand Down

0 comments on commit fafab12

Please sign in to comment.