Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unnecessary ClassMethods/InstanceMethods module split from Ope…

…nIdStoreActiveRecord.
  • Loading branch information...
commit 3a7f187bd445369ce0759d31614b26a6a3d065a0 1 parent 1fae8d9
@maxim maxim authored
Showing with 18 additions and 30 deletions.
  1. +18 −30 lib/openid_store_active_record.rb
View
48 lib/openid_store_active_record.rb
@@ -2,40 +2,28 @@
module OpenidStoreActiveRecord
- def self.included(klass)
- klass.extend ClassMethods
- klass.send(:include, InstanceMethods)
- end
+ protected
- module ClassMethods
+ def targetize(server_url)
+ MD5.hexdigest(server_url)
end
- module InstanceMethods
-
- protected
-
- def targetize(server_url)
- MD5.hexdigest(server_url)
- end
-
- def build_association(open_id_association)
- OpenID::Association.new(
- open_id_association.handle,
- open_id_association.secret,
- open_id_association.issued,
- open_id_association.lifetime,
- open_id_association.assoc_type
- )
- end
-
- def create_nonce(server_url, timestamp, salt)
- open_id_nonce = OpenidNonce.new
- open_id_nonce.target = targetize(server_url)
- open_id_nonce.server_url = server_url
- open_id_nonce.timestamp = timestamp
- open_id_nonce.save
- end
+ def build_association(open_id_association)
+ OpenID::Association.new(
+ open_id_association.handle,
+ open_id_association.secret,
+ open_id_association.issued,
+ open_id_association.lifetime,
+ open_id_association.assoc_type
+ )
+ end
+ def create_nonce(server_url, timestamp, salt)
+ open_id_nonce = OpenidNonce.new
+ open_id_nonce.target = targetize(server_url)
+ open_id_nonce.server_url = server_url
+ open_id_nonce.timestamp = timestamp
+ open_id_nonce.save
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.