Class: IndieAuthDiscovery::Profile
- Inherits:
-
Object
- Object
- IndieAuthDiscovery::Profile
- Defined in:
- lib/indieauth_discovery/profile.rb
Overview
User profile information discovery according to the IndieAuth spec.
Instance Attribute Summary collapse
-
#authorization_endpoint ⇒ Object
readonly
Returns the value of attribute authorization_endpoint.
-
#micropub_endpoint ⇒ Object
readonly
Returns the value of attribute micropub_endpoint.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#token_endpoint ⇒ Object
readonly
Returns the value of attribute token_endpoint.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
-
.discover(url) ⇒ Object
Returns a new Profile after canonicalizing and verifying the URL and discovering endpoints.
Instance Method Summary collapse
-
#discover ⇒ Object
Returns the Profile after canonicalizing and verifying the URL and discovering endpoints.
-
#initialize(url) ⇒ Profile
constructor
A new instance of Profile.
Constructor Details
Instance Attribute Details
#authorization_endpoint ⇒ Object (readonly)
Returns the value of attribute authorization_endpoint.
16 17 18 |
# File 'lib/indieauth_discovery/profile.rb', line 16 def @authorization_endpoint end |
#micropub_endpoint ⇒ Object (readonly)
Returns the value of attribute micropub_endpoint.
16 17 18 |
# File 'lib/indieauth_discovery/profile.rb', line 16 def micropub_endpoint @micropub_endpoint end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
16 17 18 |
# File 'lib/indieauth_discovery/profile.rb', line 16 def response @response end |
#token_endpoint ⇒ Object (readonly)
Returns the value of attribute token_endpoint.
16 17 18 |
# File 'lib/indieauth_discovery/profile.rb', line 16 def token_endpoint @token_endpoint end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
16 17 18 |
# File 'lib/indieauth_discovery/profile.rb', line 16 def url @url end |
Class Method Details
.discover(url) ⇒ Object
Returns a new Profile after canonicalizing and verifying the URL and discovering endpoints.
23 24 25 |
# File 'lib/indieauth_discovery/profile.rb', line 23 def self.discover(url) new(url).discover end |
Instance Method Details
#discover ⇒ Object
Returns the Profile after canonicalizing and verifying the URL and discovering endpoints.
28 29 30 31 32 33 |
# File 'lib/indieauth_discovery/profile.rb', line 28 def discover canonicalize_url fetch_profile find_endpoints self end |