Class: ThreeScaleToolbox::CRD::ProductDeploymentParser::OidcParser

Inherits:
Object
  • Object
show all
Defined in:
lib/3scale_toolbox/crds/product_deployment_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cr) ⇒ OidcParser

Returns a new instance of OidcParser.



154
155
156
157
158
159
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 154

def initialize(cr)
  @cr = cr
  @security_parser = SecurityParser.new(cr.fetch('security', {}))
  @gaterway_response_parser = GatewayResponseParser.new(cr.fetch('gatewayResponse', {}))
  @authentication_flow_parser = AuthenticationFlowParser.new(cr.fetch('authenticationFlow', {}))
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



185
186
187
188
189
190
191
192
193
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 185

def method_missing(name, *args)
  res = authentication_flow_parser.public_send(name, *args)
  return res unless res.nil?

  res = security_parser.public_send(name, *args)
  return res unless res.nil?

  gaterway_response_parser.public_send(name, *args)
end

Instance Attribute Details

#authentication_flow_parserObject (readonly)

Returns the value of attribute authentication_flow_parser.



152
153
154
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 152

def authentication_flow_parser
  @authentication_flow_parser
end

#crObject (readonly)

Returns the value of attribute cr.



152
153
154
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 152

def cr
  @cr
end

#gaterway_response_parserObject (readonly)

Returns the value of attribute gaterway_response_parser.



152
153
154
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 152

def gaterway_response_parser
  @gaterway_response_parser
end

#security_parserObject (readonly)

Returns the value of attribute security_parser.



152
153
154
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 152

def security_parser
  @security_parser
end

Instance Method Details

#backend_versionObject



161
162
163
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 161

def backend_version
  'oidc'
end

#credentials_locationObject



165
166
167
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 165

def credentials_location
  cr['credentials']
end

#jwt_claim_with_client_idObject



177
178
179
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 177

def jwt_claim_with_client_id
  cr['jwtClaimWithClientID']
end

#jwt_claim_with_client_id_typeObject



181
182
183
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 181

def jwt_claim_with_client_id_type
  cr['jwtClaimWithClientIDType']
end

#oidc_issuer_endpointObject



169
170
171
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 169

def oidc_issuer_endpoint
  cr['issuerEndpoint']
end

#oidc_issuer_typeObject



173
174
175
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 173

def oidc_issuer_type
  cr['issuerType']
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


195
196
197
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 195

def respond_to_missing?(method_name, include_private = false)
  super
end