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
-
#grant_types ⇒ Object
readonly
Returns the value of attribute grant_types.
-
#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.
Instance Method Summary collapse
-
#initialize(redirect_uris:, token_endpoint_auth_method: 'none', grant_types: %w[authorization_code refresh_token],, response_types: ['code'], scope: 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) ⇒ ClientMetadata
Returns a new instance of ClientMetadata.
96 97 98 99 100 101 102 103 104 |
# File 'lib/mcp_client/auth.rb', line 96 def initialize(redirect_uris:, token_endpoint_auth_method: 'none', grant_types: %w[authorization_code refresh_token], response_types: ['code'], scope: nil) @redirect_uris = redirect_uris @token_endpoint_auth_method = token_endpoint_auth_method @grant_types = grant_types @response_types = response_types @scope = scope end |
Instance Attribute Details
#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 |
#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 |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for HTTP requests
108 109 110 111 112 113 114 115 116 |
# File 'lib/mcp_client/auth.rb', line 108 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 }.compact end |