Class: Twilio::REST::Oauth::V1::OpenidDiscoveryInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ OpenidDiscoveryInstance

Initialize the OpenidDiscoveryInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this OpenidDiscovery resource.

  • sid (String)

    The SID of the Call resource to fetch.



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 122

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

Instance Method Details

#authorization_endpointString

Returns The endpoint that validates all authorization requests.

Returns:

  • (String)

    The endpoint that validates all authorization requests.



166
167
168
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 166

def authorization_endpoint
    @properties['authorization_endpoint']
end

#claims_supportedArray<String>

Returns A collection of claims supported by authorization server for identity token.

Returns:

  • (Array<String>)

    A collection of claims supported by authorization server for identity token



226
227
228
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 226

def claims_supported
    @properties['claims_supported']
end

#contextOpenidDiscoveryContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



151
152
153
154
155
156
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 151

def context
    unless @instance_context
        @instance_context = OpenidDiscoveryContext.new(@version )
    end
    @instance_context
end

#device_authorization_endpointString

Returns The endpoint that validates all device code related authorization requests.

Returns:

  • (String)

    The endpoint that validates all device code related authorization requests.



172
173
174
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 172

def device_authorization_endpoint
    @properties['device_authorization_endpoint']
end

#fetchOpenidDiscoveryInstance

Fetch the OpenidDiscoveryInstance

Returns:



239
240
241
242
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 239

def fetch

    context.fetch
end

#id_token_signing_alg_values_supportedArray<String>

Returns A collection of JWS signing algorithms supported by authorization server to sign identity token.

Returns:

  • (Array<String>)

    A collection of JWS signing algorithms supported by authorization server to sign identity token.



214
215
216
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 214

def id_token_signing_alg_values_supported
    @properties['id_token_signing_alg_values_supported']
end

#inspectObject

Provide a detailed, user friendly representation



253
254
255
256
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 253

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Oauth.V1.OpenidDiscoveryInstance #{values}>"
end

#issuerString

Returns The URL of the party that will create the token and sign it with its private key.

Returns:

  • (String)

    The URL of the party that will create the token and sign it with its private key.



160
161
162
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 160

def issuer
    @properties['issuer']
end

#jwk_uriString

Returns The URL of your JSON Web Key Set. This set is a collection of JSON Web Keys, a standard method for representing cryptographic keys in a JSON structure.

Returns:

  • (String)

    The URL of your JSON Web Key Set. This set is a collection of JSON Web Keys, a standard method for representing cryptographic keys in a JSON structure.



196
197
198
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 196

def jwk_uri
    @properties['jwk_uri']
end

#response_type_supportedArray<String>

Returns A collection of response type supported by authorization server.

Returns:

  • (Array<String>)

    A collection of response type supported by authorization server.



202
203
204
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 202

def response_type_supported
    @properties['response_type_supported']
end

#revocation_endpointString

Returns The endpoint used to revoke access or refresh tokens issued by the authorization server.

Returns:

  • (String)

    The endpoint used to revoke access or refresh tokens issued by the authorization server.



190
191
192
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 190

def revocation_endpoint
    @properties['revocation_endpoint']
end

#scopes_supportedArray<String>

Returns A collection of scopes supported by authorization server for identity token.

Returns:

  • (Array<String>)

    A collection of scopes supported by authorization server for identity token



220
221
222
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 220

def scopes_supported
    @properties['scopes_supported']
end

#subject_type_supportedArray<String>

Returns A collection of subject by authorization server.

Returns:

  • (Array<String>)

    A collection of subject by authorization server.



208
209
210
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 208

def subject_type_supported
    @properties['subject_type_supported']
end

#to_sObject

Provide a user friendly representation



246
247
248
249
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 246

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Oauth.V1.OpenidDiscoveryInstance #{values}>"
end

#token_endpointString

Returns The URL of the token endpoint. After a client has received an authorization code, that code is presented to the token endpoint and exchanged for an identity token, an access token, and a refresh token.

Returns:

  • (String)

    The URL of the token endpoint. After a client has received an authorization code, that code is presented to the token endpoint and exchanged for an identity token, an access token, and a refresh token.



178
179
180
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 178

def token_endpoint
    @properties['token_endpoint']
end

#urlString

Returns:

  • (String)


232
233
234
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 232

def url
    @properties['url']
end

#userinfo_endpointString

Returns The URL of the user info endpoint, which returns user profile information to a client. Keep in mind that the user info endpoint returns only the information that has been requested.

Returns:

  • (String)

    The URL of the user info endpoint, which returns user profile information to a client. Keep in mind that the user info endpoint returns only the information that has been requested.



184
185
186
# File 'lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb', line 184

def userinfo_endpoint
    @properties['userinfo_endpoint']
end