Module: Legate::Auth::Schemes
- Defined in:
- lib/legate/auth/schemes.rb,
lib/legate/auth/schemes/oauth2.rb,
lib/legate/auth/schemes/api_key.rb,
lib/legate/auth/schemes/http_bearer.rb,
lib/legate/auth/schemes/openid_connect.rb,
lib/legate/auth/schemes/service_account.rb,
lib/legate/auth/schemes/google_service_account.rb
Overview
Namespace module for authentication schemes
Defined Under Namespace
Classes: ApiKey, GoogleServiceAccount, HTTPBearer, OAuth2, OpenIDConnect, ServiceAccount
Constant Summary collapse
- HttpBearer =
Alias HTTPBearer as HttpBearer for backward compatibility
HTTPBearer- OIDC =
Alias for backward compatibility
OpenIDConnect
Class Method Summary collapse
-
.create(type, **options) ⇒ Legate::Auth::Scheme
Create a scheme instance based on type.
Class Method Details
.create(type, **options) ⇒ Legate::Auth::Scheme
Create a scheme instance based on type
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/legate/auth/schemes.rb', line 20 def self.create(type, **) case type.to_sym when :api_key ApiKey.new(**) when :http_bearer HTTPBearer.new(**) when :oauth2 OAuth2.new(**) when :oidc, :openid_connect OpenIDConnect.new(**) when :service_account ServiceAccount.new(**) when :google_service_account GoogleServiceAccount.new(**) else raise Legate::Auth::ConfigurationError, "Unknown scheme type: #{type}" end end |