From 5c4d43accf59faae5e446eed4ff34951a4fe2f02 Mon Sep 17 00:00:00 2001 From: Robert Schaefer Date: Tue, 4 Apr 2017 15:34:18 +0200 Subject: [PATCH] update README, example code how to configure a public key --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f57ddc2..23e664f 100644 --- a/README.md +++ b/README.md @@ -287,7 +287,12 @@ You can specify any of the algorithms supported by the [jwt](https://github.com/jwt/ruby-jwt) gem. If the algorithm you use requires a public key, you also need to set -`token_public_key` in the initializer. +`token_public_key` in the initializer: +``` +# example for RS256 +config.token_signature_algorithm = 'RS256' +config.token_public_key = OpenSSL::PKey::RSA.new File.read(File.join(Rails.root, 'public_key.pem')) +``` ## CORS