Class: OmniauthOidc::ResponseObjects::UserInfo
- Inherits:
-
Object
- Object
- OmniauthOidc::ResponseObjects::UserInfo
show all
- Defined in:
- lib/omniauth/oidc/response_objects.rb
Overview
Represents OIDC UserInfo response
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(attributes = {}) ⇒ UserInfo
54
55
56
|
# File 'lib/omniauth/oidc/response_objects.rb', line 54
def initialize(attributes = {})
@raw_attributes = attributes.is_a?(Hash) ? attributes : attributes.to_h
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
Allow method-style access to custom claims
140
141
142
143
144
|
# File 'lib/omniauth/oidc/response_objects.rb', line 140
def method_missing(method_name, *args)
return raw_attributes[method_name.to_s] if raw_attributes.key?(method_name.to_s)
super
end
|
Instance Attribute Details
#raw_attributes ⇒ Object
Returns the value of attribute raw_attributes.
52
53
54
|
# File 'lib/omniauth/oidc/response_objects.rb', line 52
def raw_attributes
@raw_attributes
end
|
Instance Method Details
#address ⇒ Object
131
132
133
|
# File 'lib/omniauth/oidc/response_objects.rb', line 131
def address
raw_attributes["address"]
end
|
#birthdate ⇒ Object
111
112
113
|
# File 'lib/omniauth/oidc/response_objects.rb', line 111
def birthdate
raw_attributes["birthdate"]
end
|
#email ⇒ Object
99
100
101
|
# File 'lib/omniauth/oidc/response_objects.rb', line 99
def email
raw_attributes["email"]
end
|
#email_verified ⇒ Object
103
104
105
|
# File 'lib/omniauth/oidc/response_objects.rb', line 103
def email_verified
raw_attributes["email_verified"]
end
|
#family_name ⇒ Object
71
72
73
|
# File 'lib/omniauth/oidc/response_objects.rb', line 71
def family_name
raw_attributes["family_name"]
end
|
#gender ⇒ Object
107
108
109
|
# File 'lib/omniauth/oidc/response_objects.rb', line 107
def gender
raw_attributes["gender"]
end
|
#given_name ⇒ Object
67
68
69
|
# File 'lib/omniauth/oidc/response_objects.rb', line 67
def given_name
raw_attributes["given_name"]
end
|
#locale ⇒ Object
119
120
121
|
# File 'lib/omniauth/oidc/response_objects.rb', line 119
def locale
raw_attributes["locale"]
end
|
#middle_name ⇒ Object
75
76
77
|
# File 'lib/omniauth/oidc/response_objects.rb', line 75
def middle_name
raw_attributes["middle_name"]
end
|
#name ⇒ Object
63
64
65
|
# File 'lib/omniauth/oidc/response_objects.rb', line 63
def name
raw_attributes["name"]
end
|
#nickname ⇒ Object
79
80
81
|
# File 'lib/omniauth/oidc/response_objects.rb', line 79
def nickname
raw_attributes["nickname"]
end
|
#phone_number ⇒ Object
123
124
125
|
# File 'lib/omniauth/oidc/response_objects.rb', line 123
def phone_number
raw_attributes["phone_number"]
end
|
#phone_number_verified ⇒ Object
127
128
129
|
# File 'lib/omniauth/oidc/response_objects.rb', line 127
def phone_number_verified
raw_attributes["phone_number_verified"]
end
|
#picture ⇒ Object
91
92
93
|
# File 'lib/omniauth/oidc/response_objects.rb', line 91
def picture
raw_attributes["picture"]
end
|
#preferred_username ⇒ Object
83
84
85
|
# File 'lib/omniauth/oidc/response_objects.rb', line 83
def preferred_username
raw_attributes["preferred_username"]
end
|
#profile ⇒ Object
87
88
89
|
# File 'lib/omniauth/oidc/response_objects.rb', line 87
def profile
raw_attributes["profile"]
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
146
147
148
|
# File 'lib/omniauth/oidc/response_objects.rb', line 146
def respond_to_missing?(method_name, include_private = false)
raw_attributes.key?(method_name.to_s) || super
end
|
#sub ⇒ Object
59
60
61
|
# File 'lib/omniauth/oidc/response_objects.rb', line 59
def sub
raw_attributes["sub"]
end
|
#updated_at ⇒ Object
135
136
137
|
# File 'lib/omniauth/oidc/response_objects.rb', line 135
def updated_at
raw_attributes["updated_at"]
end
|
#website ⇒ Object
95
96
97
|
# File 'lib/omniauth/oidc/response_objects.rb', line 95
def website
raw_attributes["website"]
end
|
#zoneinfo ⇒ Object
115
116
117
|
# File 'lib/omniauth/oidc/response_objects.rb', line 115
def zoneinfo
raw_attributes["zoneinfo"]
end
|