Class: Appwrite::Models::OAuth2Keycloak

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/o_auth2_keycloak.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, enabled:, client_id:, client_secret:, endpoint:, realm_name:) ⇒ OAuth2Keycloak

Returns a new instance of OAuth2Keycloak.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 13

def initialize(
    id:,
    enabled:,
    client_id:,
    client_secret:,
    endpoint:,
    realm_name:
)
    @id = id
    @enabled = enabled
    @client_id = client_id
    @client_secret = client_secret
    @endpoint = endpoint
    @realm_name = realm_name
end

Instance Attribute Details

#client_idObject (readonly)

Returns the value of attribute client_id.



8
9
10
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 8

def client_id
  @client_id
end

#client_secretObject (readonly)

Returns the value of attribute client_secret.



9
10
11
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 9

def client_secret
  @client_secret
end

#enabledObject (readonly)

Returns the value of attribute enabled.



7
8
9
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 7

def enabled
  @enabled
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



10
11
12
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 10

def endpoint
  @endpoint
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 6

def id
  @id
end

#realm_nameObject (readonly)

Returns the value of attribute realm_name.



11
12
13
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 11

def realm_name
  @realm_name
end

Class Method Details

.from(map:) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 29

def self.from(map:)
    OAuth2Keycloak.new(
        id: map["$id"],
        enabled: map["enabled"],
        client_id: map["clientId"],
        client_secret: map["clientSecret"],
        endpoint: map["endpoint"],
        realm_name: map["realmName"]
    )
end

Instance Method Details

#to_mapObject



40
41
42
43
44
45
46
47
48
49
# File 'lib/appwrite/models/o_auth2_keycloak.rb', line 40

def to_map
    {
        "$id": @id,
        "enabled": @enabled,
        "clientId": @client_id,
        "clientSecret": @client_secret,
        "endpoint": @endpoint,
        "realmName": @realm_name
    }
end