Class: Legate::Auth::Coordinators::OIDCCoordinator
- Inherits:
-
OAuth2Coordinator
- Object
- Legate::Auth::Coordinator
- OAuth2Coordinator
- Legate::Auth::Coordinators::OIDCCoordinator
- Defined in:
- lib/legate/auth/coordinators/oidc_coordinator.rb
Overview
OIDCCoordinator handles the interactive OpenID Connect authentication flow using fibers. It extends the OAuth2Coordinator with OIDC-specific functionality.
Constant Summary
Constants inherited from Legate::Auth::Coordinator
Legate::Auth::Coordinator::DEFAULT_TIMEOUT
Instance Attribute Summary
Attributes inherited from Legate::Auth::Coordinator
Instance Method Summary collapse
-
#initialize(scheme:, credential:, session_service:, token_store: nil, timeout: DEFAULT_TIMEOUT, redirect_uri: nil) ⇒ OIDCCoordinator
constructor
Initialize a new OIDC coordinator.
Methods inherited from Legate::Auth::Coordinator
#cancel, #complete?, #resume, #start, #success?
Constructor Details
#initialize(scheme:, credential:, session_service:, token_store: nil, timeout: DEFAULT_TIMEOUT, redirect_uri: nil) ⇒ OIDCCoordinator
Initialize a new OIDC coordinator
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/legate/auth/coordinators/oidc_coordinator.rb', line 20 def initialize(scheme:, credential:, session_service:, token_store: nil, timeout: DEFAULT_TIMEOUT, redirect_uri: nil) super raise ArgumentError, "Expected an OIDC scheme, got #{scheme.class}" unless scheme.is_a?(Legate::Auth::Schemes::OIDC) return if credential.auth_type == :oidc # Allow OAuth2 credentials as they are compatible return if credential.auth_type == :oauth2 raise ArgumentError, "Credential must have auth_type :oidc or :oauth2, got #{credential.auth_type}" end |