Class: Authlete::Model::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/authlete/model/service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accessTokenDurationObject Also known as: access_token_duration

The duration of access tokens in seconds. (Integer)



25
26
27
# File 'lib/authlete/model/service.rb', line 25

def accessTokenDuration
  @accessTokenDuration
end

#accessTokenTypeObject Also known as: access_token_type

The access token type. (String)



30
31
32
# File 'lib/authlete/model/service.rb', line 30

def accessTokenType
  @accessTokenType
end

#apiKeyObject Also known as: api_key

The API key. (Long)



35
36
37
# File 'lib/authlete/model/service.rb', line 35

def apiKey
  @apiKey
end

#apiSecretObject Also known as: api_secret

The API secret. (String)



40
41
42
# File 'lib/authlete/model/service.rb', line 40

def apiSecret
  @apiSecret
end

#authenticationCallbackApiKeyObject Also known as: authentication_callback_api_key

The API key to access the authentication callback endpoint. (String)



45
46
47
# File 'lib/authlete/model/service.rb', line 45

def authenticationCallbackApiKey
  @authenticationCallbackApiKey
end

#authenticationCallbackApiSecretObject Also known as: authentication_callback_api_secret

The API secret to access the authentication callback endpoint. (String)



50
51
52
# File 'lib/authlete/model/service.rb', line 50

def authenticationCallbackApiSecret
  @authenticationCallbackApiSecret
end

#authenticationCallbackEndpointObject Also known as: authentication_callback_endpoint

The URI of the authentication callback endpoint. (URI)



55
56
57
# File 'lib/authlete/model/service.rb', line 55

def authenticationCallbackEndpoint
  @authenticationCallbackEndpoint
end

#authorizationEndpointObject Also known as: authorization_endpoint

The URI of the authorization endpoint. (URI)



60
61
62
# File 'lib/authlete/model/service.rb', line 60

def authorizationEndpoint
  @authorizationEndpoint
end

#descriptionObject

The description of this service. (String)



65
66
67
# File 'lib/authlete/model/service.rb', line 65

def description
  @description
end

#idTokenDurationObject Also known as: id_token_duration

The duration of ID tokens in seconds. (Integer)



68
69
70
# File 'lib/authlete/model/service.rb', line 68

def idTokenDuration
  @idTokenDuration
end

#issuerObject

The issuer identifier of this OpenID Provider. (URI)



73
74
75
# File 'lib/authlete/model/service.rb', line 73

def issuer
  @issuer
end

#jwksObject

The JSON Web Key Set of this service. (String)



76
77
78
# File 'lib/authlete/model/service.rb', line 76

def jwks
  @jwks
end

#jwksUriObject Also known as: jwks_uri

The URI of the service’s JSON Web Key Set. (URI)



79
80
81
# File 'lib/authlete/model/service.rb', line 79

def jwksUri
  @jwksUri
end

#numberObject

The service number. (Integer)



84
85
86
# File 'lib/authlete/model/service.rb', line 84

def number
  @number
end

#policyUriObject Also known as: policy_uri

The URI of the service’s policy page. (URI)



87
88
89
# File 'lib/authlete/model/service.rb', line 87

def policyUri
  @policyUri
end

#refreshTokenDurationObject Also known as: refresh_token_duration

The duration of refresh tokens in seconds. (Integer)



92
93
94
# File 'lib/authlete/model/service.rb', line 92

def refreshTokenDuration
  @refreshTokenDuration
end

#registrationEndpointObject Also known as: registration_endpoint

The URI of the registration endpoint. (URI)



97
98
99
# File 'lib/authlete/model/service.rb', line 97

def registrationEndpoint
  @registrationEndpoint
end

#serviceDocumentationObject Also known as: service_documentation

The URI of the service’s documentation. (URI)



102
103
104
# File 'lib/authlete/model/service.rb', line 102

def serviceDocumentation
  @serviceDocumentation
end

#serviceNameObject Also known as: service_name

The service name. (String)



107
108
109
# File 'lib/authlete/model/service.rb', line 107

def serviceName
  @serviceName
end

#serviceOwnerNumberObject Also known as: service_owner_number

The service owner number. (Integer)



112
113
114
# File 'lib/authlete/model/service.rb', line 112

def serviceOwnerNumber
  @serviceOwnerNumber
end

#snsCredentialsObject Also known as: sns_credentials

The list of SNS credentials. (SnsCredentials array)



117
118
119
# File 'lib/authlete/model/service.rb', line 117

def snsCredentials
  @snsCredentials
end

#supportedAcrsObject Also known as: supported_acrs

The list of supported ACRs. (String array)



122
123
124
# File 'lib/authlete/model/service.rb', line 122

def supportedAcrs
  @supportedAcrs
end

#supportedClaimLocalesObject Also known as: supported_claim_locales

The list of supported claim locales. (String array)



127
128
129
# File 'lib/authlete/model/service.rb', line 127

def supportedClaimLocales
  @supportedClaimLocales
end

#supportedClaimsObject Also known as: supported_claims

The list of supported claims. (String array)



132
133
134
# File 'lib/authlete/model/service.rb', line 132

def supportedClaims
  @supportedClaims
end

#supportedClaimTypesObject Also known as: supported_claim_types

The list of supported claim types. (String array)

Valid values are “NORMAL”, “AGGREGATED” and “DISTRIBUTED”.



139
140
141
# File 'lib/authlete/model/service.rb', line 139

def supportedClaimTypes
  @supportedClaimTypes
end

#supportedDisplaysObject Also known as: supported_displays

The list of supported values of display parameter. (String array)

Valid values are “PAGE”, “POPUP”, “TOUCH” and “WAP”.



146
147
148
# File 'lib/authlete/model/service.rb', line 146

def supportedDisplays
  @supportedDisplays
end

#supportedGrantTypesObject Also known as: supported_grant_types

The list of supported grant types. (String array)

Valid values are “AUTHORIZATION_CODE”, “IMPLICIT”, “PASSWORD”, “CLIENT_CREDENTIALS” and “REFRESH_TOKEN”.



154
155
156
# File 'lib/authlete/model/service.rb', line 154

def supportedGrantTypes
  @supportedGrantTypes
end

#supportedResponseTypesObject Also known as: supported_response_types

The list of supported response types. (String array)

Valid values are “NONE”, “CODE”, “TOKEN”, “ID_TOKEN”, “CODE_TOKEN”, “CODE_ID_TOKEN”, “ID_TOKEN_TOKEN” and “CODE_ID_TOKEN_TOKEN”.



163
164
165
# File 'lib/authlete/model/service.rb', line 163

def supportedResponseTypes
  @supportedResponseTypes
end

#supportedScopesObject Also known as: supported_scopes

The list of supported scopes. (Scope array)



168
169
170
# File 'lib/authlete/model/service.rb', line 168

def supportedScopes
  @supportedScopes
end

#supportedSnsesObject Also known as: supported_snses

The list of supported SNSes. (Sns array)



173
174
175
# File 'lib/authlete/model/service.rb', line 173

def supportedSnses
  @supportedSnses
end

#supportedTokenAuthMethodsObject Also known as: supported_token_auth_methods

The list of supported client authentication methods at the token endpoint. (String array)

Valid values are “NONE”, “CLIENT_SECRET_BASIC”, “CLIENT_SECRET_POST”, “CLIENT_SECRET_JWT” and “PRIVATE_KEY_JWT”.



181
182
183
# File 'lib/authlete/model/service.rb', line 181

def supportedTokenAuthMethods
  @supportedTokenAuthMethods
end

#supportedUiLocalesObject Also known as: supported_ui_locales

The list of supported UI locales. (String array)



186
187
188
# File 'lib/authlete/model/service.rb', line 186

def supportedUiLocales
  @supportedUiLocales
end

#tokenEndpointObject Also known as: token_endpoint

The URI of the token endpoint. (URI)



191
192
193
# File 'lib/authlete/model/service.rb', line 191

def tokenEndpoint
  @tokenEndpoint
end

#tosUriObject Also known as: tos_uri

The URI of the service’s “Terms Of Service” page. (URI)



196
197
198
# File 'lib/authlete/model/service.rb', line 196

def tosUri
  @tosUri
end

#userInfoEndpointObject Also known as: user_info_endpoint

The URI of UserInfo endpoint. (URI)



201
202
203
# File 'lib/authlete/model/service.rb', line 201

def userInfoEndpoint
  @userInfoEndpoint
end

Class Method Details

.parse(hash) ⇒ Object

Construct an instance from the given hash.

If the given argument is nil or is not a Hash, nil is returned. Otherwise, Service.new(hash) is returned.



365
366
367
368
369
370
371
# File 'lib/authlete/model/service.rb', line 365

def self.parse(hash)
  if hash.nil? or (hash.kind_of?(Hash) == false)
    return nil
  end

  return Service.new(hash)
end

Instance Method Details

#[](key) ⇒ Object



396
397
398
399
400
401
402
403
404
# File 'lib/authlete/model/service.rb', line 396

def [](key)
  key = authlete_model_service_to_key(key)

  if respond_to?(key)
    return send(key)
  else
    return nil
  end
end

#[]=(key, value) ⇒ Object



406
407
408
409
410
411
412
413
414
415
# File 'lib/authlete/model/service.rb', line 406

def []=(key, value)
  key = authlete_model_service_to_key(key)
  method = "#{key}="

  if respond_to?(method)
    return send(method, value)
  else
    return nil
  end
end

#to_hashObject

Convert this object into a hash.



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/authlete/model/service.rb', line 379

def to_hash
  hash = {}

  instance_variables.each do |var|
    key = var.to_s.delete("@").to_sym
    val = instance_variable_get(var)

    if authlete_model_service_simple_attribute?(key) or val.nil?
      hash[key] = val
    elsif val.kind_of?(Array)
      hash[key] = val.map {|element| element.to_hash}
    end
  end

  return hash
end

#update(hash) ⇒ Object

Set attribute values using the given hash.



374
375
376
# File 'lib/authlete/model/service.rb', line 374

def update(hash)
  authlete_model_service_update(hash)
end