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
-
#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) ⇒ ClientMetadata
constructor
rubocop:disable Metrics/ParameterLists.
-
#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) ⇒ ClientMetadata
rubocop:disable Metrics/ParameterLists
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/mcp_client/auth.rb', line 104 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) # rubocop:enable Metrics/ParameterLists @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 end |
Instance Attribute Details
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def client_name @client_name end |
#client_uri ⇒ Object (readonly)
Returns the value of attribute client_uri.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def client_uri @client_uri end |
#contacts ⇒ Object (readonly)
Returns the value of attribute contacts.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def contacts @contacts end |
#grant_types ⇒ Object (readonly)
Returns the value of attribute grant_types.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def grant_types @grant_types end |
#logo_uri ⇒ Object (readonly)
Returns the value of attribute logo_uri.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def logo_uri @logo_uri end |
#policy_uri ⇒ Object (readonly)
Returns the value of attribute policy_uri.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def policy_uri @policy_uri end |
#redirect_uris ⇒ Object (readonly)
Returns the value of attribute redirect_uris.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def redirect_uris @redirect_uris end |
#response_types ⇒ Object (readonly)
Returns the value of attribute response_types.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def response_types @response_types end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def scope @scope end |
#token_endpoint_auth_method ⇒ Object (readonly)
Returns the value of attribute token_endpoint_auth_method.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def token_endpoint_auth_method @token_endpoint_auth_method end |
#tos_uri ⇒ Object (readonly)
Returns the value of attribute tos_uri.
89 90 91 |
# File 'lib/mcp_client/auth.rb', line 89 def tos_uri @tos_uri end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for HTTP requests
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/mcp_client/auth.rb', line 125 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 }.compact end |