Class: PandaPal::Platform::Generic
- Inherits:
-
Platform
- Object
- Platform
- PandaPal::Platform::Generic
- Defined in:
- app/models/panda_pal/platform.rb
Class Method Summary collapse
Instance Method Summary collapse
- #authentication_redirect_url ⇒ Object
- #grant_url ⇒ Object
-
#initialize(options) ⇒ Generic
constructor
A new instance of Generic.
- #jwks_url ⇒ Object
- #platform_uri ⇒ Object
- #serialize ⇒ Object
Constructor Details
#initialize(options) ⇒ Generic
Returns a new instance of Generic.
108 109 110 |
# File 'app/models/panda_pal/platform.rb', line 108 def initialize() @options = end |
Class Method Details
.from_urls(base_url, jwks: nil, auth_redirect: nil, grant: nil) ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'app/models/panda_pal/platform.rb', line 99 def self.from_urls(base_url, jwks: nil, auth_redirect: nil, grant: nil) new({ base_url: base_url, jwks_url: jwks, auth_redirect_url: auth_redirect, grant_url: grant, }) end |
Instance Method Details
#authentication_redirect_url ⇒ Object
120 121 122 |
# File 'app/models/panda_pal/platform.rb', line 120 def authentication_redirect_url URI.join([:base_url], [:auth_redirect_url] || "/api/lti/authorize_redirect").to_s end |
#grant_url ⇒ Object
124 125 126 |
# File 'app/models/panda_pal/platform.rb', line 124 def grant_url URI.join([:base_url], [:grant_url] || "/login/oauth2/token").to_s end |
#jwks_url ⇒ Object
116 117 118 |
# File 'app/models/panda_pal/platform.rb', line 116 def jwks_url URI.join([:base_url], [:jwks_url] || "/api/lti/security/jwks").to_s end |
#platform_uri ⇒ Object
112 113 114 |
# File 'app/models/panda_pal/platform.rb', line 112 def platform_uri [:issuer] || [:base_url] end |
#serialize ⇒ Object
128 129 130 |
# File 'app/models/panda_pal/platform.rb', line 128 def serialize super.merge() end |