Module: StandardId

Defined in:
lib/standard_id.rb,
lib/standard_id/engine.rb,
lib/standard_id/errors.rb,
lib/standard_id/events.rb,
lib/standard_id/testing.rb,
lib/standard_id/version.rb,
lib/standard_id/api_engine.rb,
lib/standard_id/web_engine.rb,
lib/standard_id/http_client.rb,
lib/standard_id/jwt_service.rb,
lib/standard_id/events/event.rb,
lib/standard_id/passwordless.rb,
lib/standard_id/scope_config.rb,
app/models/standard_id/session.rb,
lib/standard_id/account_status.rb,
lib/standard_id/providers/base.rb,
lib/standard_id/account_locking.rb,
lib/standard_id/rate_limit_store.rb,
app/models/standard_id/credential.rb,
app/models/standard_id/identifier.rb,
lib/standard_id/api/token_manager.rb,
lib/standard_id/oauth/social_flow.rb,
lib/standard_id/provider_registry.rb,
lib/standard_id/web/token_manager.rb,
lib/standard_id/current_attributes.rb,
lib/standard_id/events/definitions.rb,
lib/standard_id/api/session_manager.rb,
lib/standard_id/oauth/password_flow.rb,
lib/standard_id/oauth/subflows/base.rb,
lib/standard_id/utils/ip_normalizer.rb,
lib/standard_id/web/session_manager.rb,
app/jobs/standard_id/application_job.rb,
app/models/standard_id/refresh_token.rb,
lib/standard_id/authorization_bypass.rb,
app/forms/standard_id/web/signup_form.rb,
app/models/standard_id/code_challenge.rb,
app/models/standard_id/device_session.rb,
app/models/standard_id/browser_session.rb,
app/models/standard_id/service_session.rb,
lib/standard_id/oauth/token_grant_flow.rb,
app/models/standard_id/email_identifier.rb,
lib/standard_id/bearer_token_extraction.rb,
lib/standard_id/events/subscribers/base.rb,
lib/standard_id/oauth/base_request_flow.rb,
lib/standard_id/testing/request_helpers.rb,
lib/standard_id/api/authentication_guard.rb,
lib/standard_id/oauth/authorization_flow.rb,
lib/standard_id/oauth/refresh_token_flow.rb,
lib/standard_id/web/authentication_guard.rb,
app/models/standard_id/application_record.rb,
app/models/standard_id/authorization_code.rb,
app/models/standard_id/client_application.rb,
lib/standard_id/passwordless/sms_strategy.rb,
app/helpers/standard_id/application_helper.rb,
app/mailers/standard_id/application_mailer.rb,
app/models/standard_id/password_credential.rb,
app/models/standard_id/username_identifier.rb,
lib/standard_id/passwordless/base_strategy.rb,
app/mailers/standard_id/passwordless_mailer.rb,
lib/standard_id/oauth/passwordless_otp_flow.rb,
lib/standard_id/passwordless/email_strategy.rb,
app/models/concerns/standard_id/credentiable.rb,
lib/standard_id/oauth/authorization_code_flow.rb,
lib/standard_id/oauth/client_credentials_flow.rb,
lib/standard_id/oauth/token_lifetime_resolver.rb,
app/models/standard_id/phone_number_identifier.rb,
lib/standard_id/testing/authentication_helpers.rb,
app/controllers/standard_id/api/base_controller.rb,
app/controllers/standard_id/web/base_controller.rb,
app/models/standard_id/client_secret_credential.rb,
lib/standard_id/utils/callable_parameter_filter.rb,
app/controllers/standard_id/web/login_controller.rb,
app/controllers/standard_id/web/logout_controller.rb,
app/controllers/standard_id/web/signup_controller.rb,
app/jobs/standard_id/cleanup_expired_sessions_job.rb,
app/models/concerns/standard_id/password_strength.rb,
lib/standard_id/oauth/implicit_authorization_flow.rb,
lib/standard_id/oauth/subflows/social_login_grant.rb,
lib/standard_id/passwordless/verification_service.rb,
app/controllers/standard_id/web/account_controller.rb,
app/controllers/concerns/standard_id/sentry_context.rb,
app/controllers/standard_id/api/sessions_controller.rb,
app/controllers/standard_id/api/userinfo_controller.rb,
app/controllers/standard_id/web/sessions_controller.rb,
app/forms/standard_id/web/reset_password_start_form.rb,
app/controllers/concerns/standard_id/inertia_support.rb,
app/controllers/concerns/standard_id/lifecycle_hooks.rb,
app/models/concerns/standard_id/account_associations.rb,
lib/generators/standard_id/install/install_generator.rb,
app/controllers/standard_id/api/oauth/base_controller.rb,
app/forms/standard_id/web/reset_password_confirm_form.rb,
lib/standard_id/events/subscribers/logging_subscriber.rb,
lib/standard_id/oauth/subflows/traditional_code_grant.rb,
app/channels/concerns/standard_id/cable_authentication.rb,
app/controllers/concerns/standard_id/controller_policy.rb,
app/controllers/concerns/standard_id/inertia_rendering.rb,
app/controllers/concerns/standard_id/passwordless_flow.rb,
app/controllers/standard_id/api/oidc/logout_controller.rb,
app/controllers/concerns/standard_id/api_authentication.rb,
app/controllers/concerns/standard_id/web_authentication.rb,
app/controllers/concerns/standard_id/web_mechanism_gate.rb,
app/controllers/standard_id/api/oauth/tokens_controller.rb,
app/controllers/standard_id/api/passwordless_controller.rb,
app/controllers/standard_id/web/login_verify_controller.rb,
app/jobs/standard_id/cleanup_expired_refresh_tokens_job.rb,
app/controllers/concerns/standard_id/rate_limit_handling.rb,
app/controllers/standard_id/api/authorization_controller.rb,
app/controllers/concerns/standard_id/audience_verification.rb,
app/controllers/concerns/standard_id/passwordless_strategy.rb,
app/controllers/concerns/standard_id/social_authentication.rb,
app/controllers/standard_id/api/well_known/jwks_controller.rb,
lib/standard_id/oauth/authorization_code_authorization_flow.rb,
app/controllers/concerns/standard_id/web/social_login_params.rb,
app/controllers/standard_id/api/oauth/revocations_controller.rb,
app/controllers/standard_id/web/verify_email/base_controller.rb,
app/controllers/standard_id/web/verify_phone/base_controller.rb,
lib/standard_id/events/subscribers/account_status_subscriber.rb,
app/controllers/standard_id/web/verify_email/start_controller.rb,
app/controllers/standard_id/web/verify_phone/start_controller.rb,
lib/standard_id/events/subscribers/account_locking_subscriber.rb,
app/controllers/standard_id/web/reset_password/start_controller.rb,
app/controllers/standard_id/web/verify_email/confirm_controller.rb,
app/controllers/standard_id/web/verify_phone/confirm_controller.rb,
app/controllers/concerns/standard_id/set_current_request_details.rb,
app/controllers/standard_id/web/reset_password/confirm_controller.rb,
app/controllers/standard_id/web/auth/callback/providers_controller.rb,
app/controllers/standard_id/api/oauth/callback/providers_controller.rb,
lib/standard_id/events/subscribers/passwordless_delivery_subscriber.rb,
app/controllers/standard_id/api/well_known/openid_configuration_controller.rb

Defined Under Namespace

Modules: AccountAssociations, AccountLocking, AccountStatus, Api, ApiAuthentication, ApplicationHelper, AudienceVerification, AuthorizationBypass, BearerTokenExtraction, CableAuthentication, ControllerPolicy, Credentiable, CurrentAttributes, Events, Generators, InertiaRendering, InertiaSupport, LifecycleHooks, Oauth, PasswordStrength, Passwordless, PasswordlessFlow, PasswordlessStrategy, Providers, RateLimitHandling, SentryContext, SetCurrentRequestDetails, SocialAuthentication, Testing, Utils, Web, WebAuthentication, WebMechanismGate Classes: AccountDeactivatedError, AccountLockedError, ApiEngine, ApplicationJob, ApplicationMailer, ApplicationRecord, AuthenticationDenied, AuthorizationCode, BrowserSession, CleanupExpiredRefreshTokensJob, CleanupExpiredSessionsJob, ClientApplication, ClientSecretCredential, CodeChallenge, Credential, DeviceSession, EmailIdentifier, Engine, ExpiredSessionError, HttpClient, Identifier, InvalidAudienceError, InvalidClientError, InvalidClientSecretCredentialsError, InvalidGrantError, InvalidRequestError, InvalidScopeError, InvalidSessionError, JwtService, MissingClientSecretCredentialsError, NotAuthenticatedError, OAuthError, PasswordCredential, PasswordlessMailer, PhoneNumberIdentifier, ProviderRegistry, RateLimitStore, RefreshToken, RevokedSessionError, ScopeConfig, ServiceSession, Session, SocialLinkError, UnauthorizedClientError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UsernameIdentifier, WebEngine

Constant Summary collapse

CACHE_STORE =
Concurrent::Delay.new { config.cache_store || Rails.cache }
LOGGER =
Concurrent::Delay.new { config.logger || Rails.logger }
VERSION =
"0.14.4"

Class Method Summary collapse

Class Method Details

.account_classObject



81
82
83
# File 'lib/standard_id.rb', line 81

def 
  config..constantize
end

.cache_storeObject



73
74
75
# File 'lib/standard_id.rb', line 73

def cache_store
  CACHE_STORE.value
end

.configObject



69
70
71
# File 'lib/standard_id.rb', line 69

def config
  StandardConfig.config
end

.configure(&block) ⇒ Object



61
62
63
# File 'lib/standard_id.rb', line 61

def configure(&block)
  StandardConfig.configure(&block)
end

.loggerObject



77
78
79
# File 'lib/standard_id.rb', line 77

def logger
  LOGGER.value
end

.register(scope_name, resolver_proc) ⇒ Object



65
66
67
# File 'lib/standard_id.rb', line 65

def register(scope_name, resolver_proc)
  StandardConfig.config.register(scope_name, resolver_proc)
end

.scope_for(name) ⇒ Object



85
86
87
88
89
90
# File 'lib/standard_id.rb', line 85

def scope_for(name)
  return nil if config.scopes.blank? || name.blank?
  scope_hash = config.scopes[name.to_sym]
  return nil unless scope_hash
  ScopeConfig.new(name, scope_hash)
end

.skip_host_authorization(framework: nil, callback: nil) ⇒ Object



92
93
94
# File 'lib/standard_id.rb', line 92

def skip_host_authorization(framework: nil, callback: nil)
  AuthorizationBypass.apply(framework: framework, callback: callback)
end