class Doorkeeper::Config::Builder
Public Instance Methods
jwt_enable(flag)
click to toggle source
# File lib/doorkeeper/jwt_assertion.rb, line 45 def jwt_enable(flag) enable_jwt if flag end
jwt_private_key(key_file, passphrase = nil)
click to toggle source
# File lib/doorkeeper/jwt_assertion.rb, line 40 def jwt_private_key(key_file, passphrase = nil) key = OpenSSL::PKey::RSA.new(File.open(key_file), passphrase) set_jwt(key) end
jwt_secret(key)
click to toggle source
# File lib/doorkeeper/jwt_assertion.rb, line 36 def jwt_secret(key) set_jwt(key) end
Private Instance Methods
enable_jwt()
click to toggle source
# File lib/doorkeeper/jwt_assertion.rb, line 55 def enable_jwt Config.class_eval do alias_method :remember_calculate_token_grant_types, :calculate_token_grant_types define_method :calculate_token_grant_types do remember_calculate_token_grant_types << 'assertion' << 'urn:ietf:params:oauth:grant-type:jwt-bearer' end end end
set_jwt(key)
click to toggle source
# File lib/doorkeeper/jwt_assertion.rb, line 51 def set_jwt(key) jwt_key key end