## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Oauth < Domain class V1 < Version class OpenidDiscoveryList < ListResource ## # Initialize the OpenidDiscoveryList # @param [Version] version Version that contains the resource # @return [OpenidDiscoveryList] OpenidDiscoveryList def initialize(version) super(version) # Path Solution @solution = {} end ## # Provide a user friendly representation def to_s '#' end end class OpenidDiscoveryPage < Page ## # Initialize the OpenidDiscoveryPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [OpenidDiscoveryPage] OpenidDiscoveryPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of OpenidDiscoveryInstance # @param [Hash] payload Payload response from the API # @return [OpenidDiscoveryInstance] OpenidDiscoveryInstance def get_instance(payload) OpenidDiscoveryInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s '' end end class OpenidDiscoveryContext < InstanceContext ## # Initialize the OpenidDiscoveryContext # @param [Version] version Version that contains the resource # @return [OpenidDiscoveryContext] OpenidDiscoveryContext def initialize(version) super(version) # Path Solution @solution = {} @uri = "/.well-known/openid-configuration" end ## # Fetch the OpenidDiscoveryInstance # @return [OpenidDiscoveryInstance] Fetched OpenidDiscoveryInstance def fetch payload = @version.fetch('GET', @uri) OpenidDiscoveryInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end ## # Provide a detailed, user friendly representation def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end end class OpenidDiscoveryInstance < InstanceResource ## # Initialize the OpenidDiscoveryInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @return [OpenidDiscoveryInstance] OpenidDiscoveryInstance def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'issuer' => payload['issuer'], 'authorization_endpoint' => payload['authorization_endpoint'], 'device_authorization_endpoint' => payload['device_authorization_endpoint'], 'token_endpoint' => payload['token_endpoint'], 'userinfo_endpoint' => payload['userinfo_endpoint'], 'revocation_endpoint' => payload['revocation_endpoint'], 'jwk_uri' => payload['jwk_uri'], 'response_type_supported' => payload['response_type_supported'], 'subject_type_supported' => payload['subject_type_supported'], 'id_token_signing_alg_values_supported' => payload['id_token_signing_alg_values_supported'], 'scopes_supported' => payload['scopes_supported'], 'claims_supported' => payload['claims_supported'], 'url' => payload['url'], } # Context @instance_context = nil @params = {} end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [OpenidDiscoveryContext] OpenidDiscoveryContext for this OpenidDiscoveryInstance def context unless @instance_context @instance_context = OpenidDiscoveryContext.new(@version, ) end @instance_context end ## # @return [String] The issuer URL def issuer @properties['issuer'] end ## # @return [String] The URL of authorization endpoint def authorization_endpoint @properties['authorization_endpoint'] end ## # @return [String] The URL of device code authorization endpoint def device_authorization_endpoint @properties['device_authorization_endpoint'] end ## # @return [String] The URL of token endpoint def token_endpoint @properties['token_endpoint'] end ## # @return [String] The URL of user info endpoint def userinfo_endpoint @properties['userinfo_endpoint'] end ## # @return [String] The URL of revocation endpoint def revocation_endpoint @properties['revocation_endpoint'] end ## # @return [String] The URL of public JWK endpoint def jwk_uri @properties['jwk_uri'] end ## # @return [Array[String]] List of response type supported for identity token def response_type_supported @properties['response_type_supported'] end ## # @return [Array[String]] List of subject supported for identity token def subject_type_supported @properties['subject_type_supported'] end ## # @return [Array[String]] List of JWS signing algorithms supported for identity token def id_token_signing_alg_values_supported @properties['id_token_signing_alg_values_supported'] end ## # @return [Array[String]] List of scopes supported identity token def scopes_supported @properties['scopes_supported'] end ## # @return [Array[String]] List of claims supported for identity token def claims_supported @properties['claims_supported'] end ## # @return [String] The url def url @properties['url'] end ## # Fetch the OpenidDiscoveryInstance # @return [OpenidDiscoveryInstance] Fetched OpenidDiscoveryInstance def fetch context.fetch end ## # Provide a user friendly representation def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "" end ## # Provide a detailed, user friendly representation def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "" end end end end end end