class

Comrade::Manager

Inherits Reference < Object

Manager class for handling OAuth providers and configuration

Constructors

Class methods

instance
Source

Instance methods

clear_providers

Clear all provider configurations

Source
config

Get current configuration

Source
configure

Configure global settings

Source
configured_providers

Get all configured provider names

Source
driver(provider : Provider) : Comrade::Providers::BaseProvider

Get a provider instance by enum

Source
get_provider_config(name : String) : ProviderConfig | Nil

Get provider configuration

Source
http_timeout

Get HTTP timeout

Source
http_timeout=(timeout : Int32)

Set HTTP timeout for all providers

Source
load_config(hash : Hash(String, JSON::Any::Type))

Load configuration from hash (useful for loading from files)

Source
provider_configured?(name : String) : Bool

Check if a provider is configured

Source
provider_configured?(name : Symbol) : Bool

Check if a provider is configured (legacy symbol support)

Source
register_provider(name : String, hash : Hash(String, JSON::Any::Type))

Register a provider configuration from hash

Source
register_provider(name : String, client_id_env : String, client_secret_env : String | Nil = nil, redirect_uri : String = "", scopes : Array(String) = [] of String)

Register a provider configuration from environment variables

Source
register_provider(name : String, config : ProviderConfig)

Register a provider configuration

Source
remove_provider(name : String)

Remove a provider configuration

Source