Class: PandaPal::Platform::Generic
- Inherits:
-
Platform
- Object
- Platform
- PandaPal::Platform::Generic
- Defined in:
- app/models/panda_pal/platform.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
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.
110 111 112 |
# File 'app/models/panda_pal/platform.rb', line 110 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
99 100 101 |
# File 'app/models/panda_pal/platform.rb', line 99 def @options end |
Class Method Details
.from_urls(base_url, jwks: nil, auth_redirect: nil, grant: nil) ⇒ Object
101 102 103 104 105 106 107 108 |
# File 'app/models/panda_pal/platform.rb', line 101 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
122 123 124 |
# File 'app/models/panda_pal/platform.rb', line 122 def authentication_redirect_url URI.join([:base_url], [:auth_redirect_url] || "/api/lti/authorize_redirect").to_s end |
#grant_url ⇒ Object
126 127 128 |
# File 'app/models/panda_pal/platform.rb', line 126 def grant_url URI.join([:base_url], [:grant_url] || "/login/oauth2/token").to_s end |
#jwks_url ⇒ Object
118 119 120 |
# File 'app/models/panda_pal/platform.rb', line 118 def jwks_url URI.join([:base_url], [:jwks_url] || "/api/lti/security/jwks").to_s end |
#platform_uri ⇒ Object
114 115 116 |
# File 'app/models/panda_pal/platform.rb', line 114 def platform_uri [:issuer] || [:base_url] end |
#serialize ⇒ Object
130 131 132 |
# File 'app/models/panda_pal/platform.rb', line 130 def serialize super.merge() end |