Class: RubyLLM::MCP::Auth::GrantStrategies::AuthorizationCode

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_llm/mcp/auth/grant_strategies/authorization_code.rb

Overview

Authorization Code grant strategy Used for user authorization with PKCE (OAuth 2.1)

Instance Method Summary collapse

Instance Method Details

#auth_methodString

Public clients don't use client_secret

Returns:

  • (String)

    "none"



12
13
14
# File 'lib/ruby_llm/mcp/auth/grant_strategies/authorization_code.rb', line 12

def auth_method
  "none"
end

#grant_types_listArray<String>

Authorization code and refresh token grants

Returns:

  • (Array<String>)

    grant types



18
19
20
# File 'lib/ruby_llm/mcp/auth/grant_strategies/authorization_code.rb', line 18

def grant_types_list
  %w[authorization_code refresh_token]
end

#response_types_listArray<String>

Only "code" response type for authorization code flow

Returns:

  • (Array<String>)

    response types



24
25
26
# File 'lib/ruby_llm/mcp/auth/grant_strategies/authorization_code.rb', line 24

def response_types_list
  ["code"]
end