Skip to content

Commit fafab12

Browse files
committed
Enhance Authly configuration examples
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.
1 parent 918e8cc commit fafab12

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@ Authly.configure do |config|
7474
config.issuer = "https://your-app.com"
7575
config.secret_key = ENV["AUTHLY_SECRET_KEY"] # Ensure you keep this key secure
7676
config.public_key = ENV["AUTHLY_PUBLIC_KEY"]
77-
config.token_ttl[:access] = 3600 # Token Time-to-Live in seconds
78-
config.owners = [CustomAuthorizableOwner]
79-
config.clients = [CustomAuthorizableClient]
77+
config.refresh_ttl = 1.day # Token Time-to-Live in seconds
78+
config.code_ttl = 5.minutes
79+
config.access_ttl =1.hour
80+
config.owners = CustomAuthorizableOwner.new
81+
config.clients = CustomAuthorizableClient.new
8082
config.token_store = CustomTokenStore.new
83+
config.algorithm = JWT::Algorithm::HS256
84+
config.token_strategy = :jwt
8185
end
8286
```
8387

0 commit comments

Comments
 (0)