config in chubbies and blank public key check ms iz

This commit is contained in:
Ilya Zhitomirskiy 2011-06-14 17:34:27 -07:00
parent dca2eca67c
commit dfb48d343f
3 changed files with 8 additions and 0 deletions

View file

@ -40,6 +40,9 @@ module Chubbies
has_one :access_token, :class_name => "DiasporaClient::AccessToken", :dependent => :destroy
end
DiasporaClient.config do |d|
d.private_key_path = File.dirname(__FILE__) + "/chubbies.private.pem"
end
class App < DiasporaClient::App
def current_user

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/app'
require "bundler/setup"
run Chubbies::App

View file

@ -107,6 +107,10 @@ describe AuthorizationsController do
@controller.should_receive(:valid_nonce?).with(@nonce)
@controller.verify(Base64.encode64(@signable_string), @sig, 'public_key!')
end
it 'checks for public key' do
@controller.verify(Base64.encode64(@signable_string), @sig, '').should == "blank public key"
end
end
describe '#verify_signature' do