Class: RubyLLM::MCP::Auth::ClientMetadata
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Auth::ClientMetadata
- Defined in:
- lib/ruby_llm/mcp/auth.rb
Overview
Client metadata for dynamic client registration (RFC 7591) Supports all optional parameters from the specification
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.
-
#jwks ⇒ Object
readonly
Returns the value of attribute jwks.
-
#jwks_uri ⇒ Object
readonly
Returns the value of attribute jwks_uri.
-
#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.
-
#software_id ⇒ Object
readonly
Returns the value of attribute software_id.
-
#software_version ⇒ Object
readonly
Returns the value of attribute software_version.
-
#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, contacts: nil, tos_uri: nil, policy_uri: nil, jwks_uri: nil, jwks: nil, software_id: nil, software_version: nil) ⇒ ClientMetadata
constructor
rubocop:disable Metrics/ParameterLists.
-
#to_h ⇒ Hash
Convert to hash for registration request.
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, contacts: nil, tos_uri: nil, policy_uri: nil, jwks_uri: nil, jwks: nil, software_id: nil, software_version: nil) ⇒ ClientMetadata
rubocop:disable Metrics/ParameterLists
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/ruby_llm/mcp/auth.rb', line 104 def initialize( # rubocop:disable Metrics/ParameterLists 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, contacts: nil, tos_uri: nil, policy_uri: nil, jwks_uri: nil, jwks: nil, software_id: nil, software_version: 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 @contacts = contacts @tos_uri = tos_uri @policy_uri = policy_uri @jwks_uri = jwks_uri @jwks = jwks @software_id = software_id @software_version = software_version end |
Instance Attribute Details
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def client_name @client_name end |
#client_uri ⇒ Object (readonly)
Returns the value of attribute client_uri.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def client_uri @client_uri end |
#contacts ⇒ Object (readonly)
Returns the value of attribute contacts.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def contacts @contacts end |
#grant_types ⇒ Object (readonly)
Returns the value of attribute grant_types.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def grant_types @grant_types end |
#jwks ⇒ Object (readonly)
Returns the value of attribute jwks.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def jwks @jwks end |
#jwks_uri ⇒ Object (readonly)
Returns the value of attribute jwks_uri.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def jwks_uri @jwks_uri end |
#logo_uri ⇒ Object (readonly)
Returns the value of attribute logo_uri.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def logo_uri @logo_uri end |
#policy_uri ⇒ Object (readonly)
Returns the value of attribute policy_uri.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def policy_uri @policy_uri end |
#redirect_uris ⇒ Object (readonly)
Returns the value of attribute redirect_uris.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def redirect_uris @redirect_uris end |
#response_types ⇒ Object (readonly)
Returns the value of attribute response_types.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def response_types @response_types end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def scope @scope end |
#software_id ⇒ Object (readonly)
Returns the value of attribute software_id.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def software_id @software_id end |
#software_version ⇒ Object (readonly)
Returns the value of attribute software_version.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def software_version @software_version end |
#token_endpoint_auth_method ⇒ Object (readonly)
Returns the value of attribute token_endpoint_auth_method.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def token_endpoint_auth_method @token_endpoint_auth_method end |
#tos_uri ⇒ Object (readonly)
Returns the value of attribute tos_uri.
100 101 102 |
# File 'lib/ruby_llm/mcp/auth.rb', line 100 def tos_uri @tos_uri end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for registration request
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/ruby_llm/mcp/auth.rb', line 140 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, contacts: @contacts, tos_uri: @tos_uri, policy_uri: @policy_uri, jwks_uri: @jwks_uri, jwks: @jwks, software_id: @software_id, software_version: @software_version }.compact end |