Class: OCI::Apigateway::Models::OAuth2ResponseValidationFailurePolicy
- Inherits:
-
ValidationFailurePolicy
- Object
- ValidationFailurePolicy
- OCI::Apigateway::Models::OAuth2ResponseValidationFailurePolicy
- Defined in:
- lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb
Overview
Policy to specify OAuth2 flow configuration.
Constant Summary collapse
- RESPONSE_TYPE_ENUM =
[ RESPONSE_TYPE_CODE = 'CODE'.freeze, RESPONSE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from ValidationFailurePolicy
ValidationFailurePolicy::TYPE_ENUM
Instance Attribute Summary collapse
-
#client_details ⇒ OCI::Apigateway::Models::ClientAppDetails
This attribute is required.
-
#fallback_redirect_path ⇒ String
The path to be used as fallback after OAuth2.
-
#login_path ⇒ String
The path (relative to the deployment) where the Identity Provider will redirect the user after authentication.
-
#logout_path ⇒ String
The path to be used as logout.
-
#max_expiry_duration_in_hours ⇒ Integer
The duration for which the OAuth2 success token should be cached before it is fetched again.
-
#response_type ⇒ String
[Required] Response Type.
-
#scopes ⇒ Array<String>
[Required] List of scopes.
-
#source_uri_details ⇒ OCI::Apigateway::Models::SourceUriDetails
This attribute is required.
-
#use_cookies_for_intermediate_steps ⇒ BOOLEAN
Defines whether or not to use cookies for OAuth2 intermediate steps.
-
#use_cookies_for_session ⇒ BOOLEAN
Defines whether or not to use cookies for session maintenance.
-
#use_pkce ⇒ BOOLEAN
Defines whether or not to support PKCE.
Attributes inherited from ValidationFailurePolicy
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OAuth2ResponseValidationFailurePolicy
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from ValidationFailurePolicy
Constructor Details
#initialize(attributes = {}) ⇒ OAuth2ResponseValidationFailurePolicy
Initializes the object
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 128 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'OAUTH2' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.client_details = attributes[:'clientDetails'] if attributes[:'clientDetails'] raise 'You cannot provide both :clientDetails and :client_details' if attributes.key?(:'clientDetails') && attributes.key?(:'client_details') self.client_details = attributes[:'client_details'] if attributes[:'client_details'] self.source_uri_details = attributes[:'sourceUriDetails'] if attributes[:'sourceUriDetails'] raise 'You cannot provide both :sourceUriDetails and :source_uri_details' if attributes.key?(:'sourceUriDetails') && attributes.key?(:'source_uri_details') self.source_uri_details = attributes[:'source_uri_details'] if attributes[:'source_uri_details'] self.scopes = attributes[:'scopes'] if attributes[:'scopes'] self.max_expiry_duration_in_hours = attributes[:'maxExpiryDurationInHours'] if attributes[:'maxExpiryDurationInHours'] self.max_expiry_duration_in_hours = 1 if max_expiry_duration_in_hours.nil? && !attributes.key?(:'maxExpiryDurationInHours') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :maxExpiryDurationInHours and :max_expiry_duration_in_hours' if attributes.key?(:'maxExpiryDurationInHours') && attributes.key?(:'max_expiry_duration_in_hours') self.max_expiry_duration_in_hours = attributes[:'max_expiry_duration_in_hours'] if attributes[:'max_expiry_duration_in_hours'] self.max_expiry_duration_in_hours = 1 if max_expiry_duration_in_hours.nil? && !attributes.key?(:'maxExpiryDurationInHours') && !attributes.key?(:'max_expiry_duration_in_hours') # rubocop:disable Style/StringLiterals self. = attributes[:'useCookiesForSession'] unless attributes[:'useCookiesForSession'].nil? self. = false if .nil? && !attributes.key?(:'useCookiesForSession') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :useCookiesForSession and :use_cookies_for_session' if attributes.key?(:'useCookiesForSession') && attributes.key?(:'use_cookies_for_session') self. = attributes[:'use_cookies_for_session'] unless attributes[:'use_cookies_for_session'].nil? self. = false if .nil? && !attributes.key?(:'useCookiesForSession') && !attributes.key?(:'use_cookies_for_session') # rubocop:disable Style/StringLiterals self. = attributes[:'useCookiesForIntermediateSteps'] unless attributes[:'useCookiesForIntermediateSteps'].nil? self. = false if .nil? && !attributes.key?(:'useCookiesForIntermediateSteps') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :useCookiesForIntermediateSteps and :use_cookies_for_intermediate_steps' if attributes.key?(:'useCookiesForIntermediateSteps') && attributes.key?(:'use_cookies_for_intermediate_steps') self. = attributes[:'use_cookies_for_intermediate_steps'] unless attributes[:'use_cookies_for_intermediate_steps'].nil? self. = false if .nil? && !attributes.key?(:'useCookiesForIntermediateSteps') && !attributes.key?(:'use_cookies_for_intermediate_steps') # rubocop:disable Style/StringLiterals self.use_pkce = attributes[:'usePkce'] unless attributes[:'usePkce'].nil? self.use_pkce = false if use_pkce.nil? && !attributes.key?(:'usePkce') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :usePkce and :use_pkce' if attributes.key?(:'usePkce') && attributes.key?(:'use_pkce') self.use_pkce = attributes[:'use_pkce'] unless attributes[:'use_pkce'].nil? self.use_pkce = false if use_pkce.nil? && !attributes.key?(:'usePkce') && !attributes.key?(:'use_pkce') # rubocop:disable Style/StringLiterals self.response_type = attributes[:'responseType'] if attributes[:'responseType'] raise 'You cannot provide both :responseType and :response_type' if attributes.key?(:'responseType') && attributes.key?(:'response_type') self.response_type = attributes[:'response_type'] if attributes[:'response_type'] self.fallback_redirect_path = attributes[:'fallbackRedirectPath'] if attributes[:'fallbackRedirectPath'] raise 'You cannot provide both :fallbackRedirectPath and :fallback_redirect_path' if attributes.key?(:'fallbackRedirectPath') && attributes.key?(:'fallback_redirect_path') self.fallback_redirect_path = attributes[:'fallback_redirect_path'] if attributes[:'fallback_redirect_path'] self.logout_path = attributes[:'logoutPath'] if attributes[:'logoutPath'] raise 'You cannot provide both :logoutPath and :logout_path' if attributes.key?(:'logoutPath') && attributes.key?(:'logout_path') self.logout_path = attributes[:'logout_path'] if attributes[:'logout_path'] self.login_path = attributes[:'loginPath'] if attributes[:'loginPath'] raise 'You cannot provide both :loginPath and :login_path' if attributes.key?(:'loginPath') && attributes.key?(:'login_path') self.login_path = attributes[:'login_path'] if attributes[:'login_path'] end |
Instance Attribute Details
#client_details ⇒ OCI::Apigateway::Models::ClientAppDetails
This attribute is required.
21 22 23 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 21 def client_details @client_details end |
#fallback_redirect_path ⇒ String
The path to be used as fallback after OAuth2.
58 59 60 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 58 def fallback_redirect_path @fallback_redirect_path end |
#login_path ⇒ String
The path (relative to the deployment) where the Identity Provider will redirect the user after authentication. This path must match a route in the specification that uses the OAUTH2_LOGIN_BACKEND.
69 70 71 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 69 def login_path @login_path end |
#logout_path ⇒ String
The path to be used as logout.
62 63 64 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 62 def logout_path @logout_path end |
#max_expiry_duration_in_hours ⇒ Integer
The duration for which the OAuth2 success token should be cached before it is fetched again.
35 36 37 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 35 def max_expiry_duration_in_hours @max_expiry_duration_in_hours end |
#response_type ⇒ String
[Required] Response Type.
54 55 56 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 54 def response_type @response_type end |
#scopes ⇒ Array<String>
[Required] List of scopes.
29 30 31 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 29 def scopes @scopes end |
#source_uri_details ⇒ OCI::Apigateway::Models::SourceUriDetails
This attribute is required.
25 26 27 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 25 def source_uri_details @source_uri_details end |
#use_cookies_for_intermediate_steps ⇒ BOOLEAN
Defines whether or not to use cookies for OAuth2 intermediate steps.
45 46 47 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 45 def @use_cookies_for_intermediate_steps end |
#use_cookies_for_session ⇒ BOOLEAN
Defines whether or not to use cookies for session maintenance.
40 41 42 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 40 def @use_cookies_for_session end |
#use_pkce ⇒ BOOLEAN
Defines whether or not to support PKCE.
50 51 52 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 50 def use_pkce @use_pkce end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'client_details': :'clientDetails', 'source_uri_details': :'sourceUriDetails', 'scopes': :'scopes', 'max_expiry_duration_in_hours': :'maxExpiryDurationInHours', 'use_cookies_for_session': :'useCookiesForSession', 'use_cookies_for_intermediate_steps': :'useCookiesForIntermediateSteps', 'use_pkce': :'usePkce', 'response_type': :'responseType', 'fallback_redirect_path': :'fallbackRedirectPath', 'logout_path': :'logoutPath', 'login_path': :'loginPath' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 92 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'client_details': :'OCI::Apigateway::Models::ClientAppDetails', 'source_uri_details': :'OCI::Apigateway::Models::SourceUriDetails', 'scopes': :'Array<String>', 'max_expiry_duration_in_hours': :'Integer', 'use_cookies_for_session': :'BOOLEAN', 'use_cookies_for_intermediate_steps': :'BOOLEAN', 'use_pkce': :'BOOLEAN', 'response_type': :'String', 'fallback_redirect_path': :'String', 'logout_path': :'String', 'login_path': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 229 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && client_details == other.client_details && source_uri_details == other.source_uri_details && scopes == other.scopes && max_expiry_duration_in_hours == other.max_expiry_duration_in_hours && == other. && == other. && use_pkce == other.use_pkce && response_type == other.response_type && fallback_redirect_path == other.fallback_redirect_path && logout_path == other.logout_path && login_path == other.login_path end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 270 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
250 251 252 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 250 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
259 260 261 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 259 def hash [type, client_details, source_uri_details, scopes, max_expiry_duration_in_hours, , , use_pkce, response_type, fallback_redirect_path, logout_path, login_path].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
303 304 305 306 307 308 309 310 311 312 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 303 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
297 298 299 |
# File 'lib/oci/apigateway/models/o_auth2_response_validation_failure_policy.rb', line 297 def to_s to_hash.to_s end |