Class: Appwrite::Models::Oauth2Introspection

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(active:, token_use: nil, token_type: nil, scope: nil, client_id: nil, sub: nil, aud: nil, iss: nil, exp: nil, iat: nil, jti: nil, authorization_details: nil) ⇒ Oauth2Introspection

Returns a new instance of Oauth2Introspection.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/appwrite/models/oauth2_introspection.rb', line 19

def initialize(
    active:,
    token_use: nil,
    token_type: nil,
    scope: nil,
    client_id: nil,
    sub: nil,
    aud: nil,
    iss: nil,
    exp: nil,
    iat: nil,
    jti: nil,
    authorization_details: nil
)
    @active = active
    @token_use = token_use
    @token_type = token_type
    @scope = scope
    @client_id = client_id
    @sub = sub
    @aud = aud
    @iss = iss
    @exp = exp
    @iat = iat
    @jti = jti
    @authorization_details = authorization_details
end

Instance Attribute Details

#active ⇒ Object (readonly)

Returns the value of attribute active.



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

def active
  @active
end

#aud ⇒ Object (readonly)

Returns the value of attribute aud.



12
13
14
# File 'lib/appwrite/models/oauth2_introspection.rb', line 12

def aud
  @aud
end

#authorization_details ⇒ Object (readonly)

Returns the value of attribute authorization_details.



17
18
19
# File 'lib/appwrite/models/oauth2_introspection.rb', line 17

def authorization_details
  @authorization_details
end

#client_id ⇒ Object (readonly)

Returns the value of attribute client_id.



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

def client_id
  @client_id
end

#exp ⇒ Object (readonly)

Returns the value of attribute exp.



14
15
16
# File 'lib/appwrite/models/oauth2_introspection.rb', line 14

def exp
  @exp
end

#iat ⇒ Object (readonly)

Returns the value of attribute iat.



15
16
17
# File 'lib/appwrite/models/oauth2_introspection.rb', line 15

def iat
  @iat
end

#iss ⇒ Object (readonly)

Returns the value of attribute iss.



13
14
15
# File 'lib/appwrite/models/oauth2_introspection.rb', line 13

def iss
  @iss
end

#jti ⇒ Object (readonly)

Returns the value of attribute jti.



16
17
18
# File 'lib/appwrite/models/oauth2_introspection.rb', line 16

def jti
  @jti
end

#scope ⇒ Object (readonly)

Returns the value of attribute scope.



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

def scope
  @scope
end

#sub ⇒ Object (readonly)

Returns the value of attribute sub.



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

def sub
  @sub
end

#token_type ⇒ Object (readonly)

Returns the value of attribute token_type.



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

def token_type
  @token_type
end

#token_use ⇒ Object (readonly)

Returns the value of attribute token_use.



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

def token_use
  @token_use
end

Class Method Details

.from(map:) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/appwrite/models/oauth2_introspection.rb', line 47

def self.from(map:)
    map = { "active" => false }.merge(map)
    Oauth2Introspection.new(
        active: map["active"],
        token_use: map["token_use"],
        token_type: map["token_type"],
        scope: map["scope"],
        client_id: map["client_id"],
        sub: map["sub"],
        aud: map["aud"],
        iss: map["iss"],
        exp: map["exp"],
        iat: map["iat"],
        jti: map["jti"],
        authorization_details: map["authorization_details"]
    )
end

Instance Method Details

#to_map ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/appwrite/models/oauth2_introspection.rb', line 65

def to_map
    {
        "active": @active,
        "token_use": @token_use,
        "token_type": @token_type,
        "scope": @scope,
        "client_id": @client_id,
        "sub": @sub,
        "aud": @aud,
        "iss": @iss,
        "exp": @exp,
        "iat": @iat,
        "jti": @jti,
        "authorization_details": @authorization_details
    }
end