Module: OpenIdAuthentication
- Included in:
- ModCloth::OpenID
- Defined in:
- lib/open_id_authentication/lib/open_id_authentication.rb
Defined Under Namespace
Classes: InvalidOpenId, Result
Constant Summary
collapse
- OPEN_ID_AUTHENTICATION_DIR =
"tmp/openids"
- @@logger =
Logger.new(STDERR)
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.normalize_url(url) ⇒ Object
66
67
68
69
70
71
72
73
|
# File 'lib/open_id_authentication/lib/open_id_authentication.rb', line 66
def self.normalize_url(url)
uri = URI.parse(url.to_s.strip)
uri = URI.parse("http://#{uri}") unless uri.scheme
uri.scheme = uri.scheme.downcase uri.normalize.to_s
rescue URI::InvalidURIError
raise InvalidOpenId.new("#{url} is not an OpenID URL")
end
|
.store ⇒ Object
10
11
12
|
# File 'lib/open_id_authentication/lib/open_id_authentication.rb', line 10
def self.store
@@store
end
|
.store=(value) ⇒ Object
14
15
16
|
# File 'lib/open_id_authentication/lib/open_id_authentication.rb', line 14
def self.store=(value)
@@store = value
end
|