Class: MCPClient::Auth::ClientMetadata
- Inherits:
-
Object
- Object
- MCPClient::Auth::ClientMetadata
- Defined in:
- lib/mcp_client/auth.rb
Overview
OAuth client metadata for registration and authorization
Instance Attribute Summary collapse
-
#application_type ⇒ Object
readonly
Returns the value of attribute application_type.
-
#client_name ⇒ Object
readonly
Returns the value of attribute client_name.
-
#client_uri ⇒ Object
readonly
Returns the value of attribute client_uri.
-
#contacts ⇒ Object
readonly
Returns the value of attribute contacts.
-
#grant_types ⇒ Object
readonly
Returns the value of attribute grant_types.
-
#logo_uri ⇒ Object
readonly
Returns the value of attribute logo_uri.
-
#policy_uri ⇒ Object
readonly
Returns the value of attribute policy_uri.
-
#redirect_uris ⇒ Object
readonly
Returns the value of attribute redirect_uris.
-
#response_types ⇒ Object
readonly
Returns the value of attribute response_types.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#token_endpoint_auth_method ⇒ Object
readonly
Returns the value of attribute token_endpoint_auth_method.
-
#tos_uri ⇒ Object
readonly
Returns the value of attribute tos_uri.
Instance Method Summary collapse
-
#initialize(redirect_uris:, token_endpoint_auth_method: 'none', grant_types: %w[authorization_code refresh_token],, response_types: ['code'], scope: nil, client_name: nil, client_uri: nil, logo_uri: nil, tos_uri: nil, policy_uri: nil, contacts: nil, application_type: nil) ⇒ ClientMetadata
constructor
A new instance of ClientMetadata.
-
#to_h ⇒ Hash
Convert to hash for HTTP requests.
Constructor Details
#initialize(redirect_uris:, token_endpoint_auth_method: 'none', grant_types: %w[authorization_code refresh_token],, response_types: ['code'], scope: nil, client_name: nil, client_uri: nil, logo_uri: nil, tos_uri: nil, policy_uri: nil, contacts: nil, application_type: nil) ⇒ ClientMetadata
Returns a new instance of ClientMetadata.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/mcp_client/auth.rb', line 186 def initialize(redirect_uris:, token_endpoint_auth_method: 'none', grant_types: %w[authorization_code refresh_token], response_types: ['code'], scope: nil, client_name: nil, client_uri: nil, logo_uri: nil, tos_uri: nil, policy_uri: nil, contacts: nil, application_type: nil) @redirect_uris = redirect_uris @token_endpoint_auth_method = token_endpoint_auth_method @grant_types = grant_types @response_types = response_types @scope = scope @client_name = client_name @client_uri = client_uri @logo_uri = logo_uri @tos_uri = tos_uri @policy_uri = policy_uri @contacts = contacts @application_type = application_type end |
Instance Attribute Details
#application_type ⇒ Object (readonly)
Returns the value of attribute application_type.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def application_type @application_type end |
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def client_name @client_name end |
#client_uri ⇒ Object (readonly)
Returns the value of attribute client_uri.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def client_uri @client_uri end |
#contacts ⇒ Object (readonly)
Returns the value of attribute contacts.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def contacts @contacts end |
#grant_types ⇒ Object (readonly)
Returns the value of attribute grant_types.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def grant_types @grant_types end |
#logo_uri ⇒ Object (readonly)
Returns the value of attribute logo_uri.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def logo_uri @logo_uri end |
#policy_uri ⇒ Object (readonly)
Returns the value of attribute policy_uri.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def policy_uri @policy_uri end |
#redirect_uris ⇒ Object (readonly)
Returns the value of attribute redirect_uris.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def redirect_uris @redirect_uris end |
#response_types ⇒ Object (readonly)
Returns the value of attribute response_types.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def response_types @response_types end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def scope @scope end |
#token_endpoint_auth_method ⇒ Object (readonly)
Returns the value of attribute token_endpoint_auth_method.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def token_endpoint_auth_method @token_endpoint_auth_method end |
#tos_uri ⇒ Object (readonly)
Returns the value of attribute tos_uri.
170 171 172 |
# File 'lib/mcp_client/auth.rb', line 170 def tos_uri @tos_uri end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for HTTP requests
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/mcp_client/auth.rb', line 207 def to_h { redirect_uris: @redirect_uris, token_endpoint_auth_method: @token_endpoint_auth_method, grant_types: @grant_types, response_types: @response_types, scope: @scope, client_name: @client_name, client_uri: @client_uri, logo_uri: @logo_uri, tos_uri: @tos_uri, policy_uri: @policy_uri, contacts: @contacts, application_type: @application_type }.compact end |