ExScim.Auth.AuthProvider (ex_scim v0.2.2)

Copy Markdown View Source

Delegates authentication calls to the configured adapter.

Supports bearer token and HTTP basic authentication. The adapter is resolved at runtime from the :auth_provider_adapter application config.

Configuration

config :ex_scim, auth_provider_adapter: MyApp.ScimAuth

Summary

Functions

Returns the configured auth provider adapter module.

Validates HTTP basic auth credentials and returns the authenticated scope.

Validates a bearer token and returns the authenticated scope.

Functions

adapter()

Returns the configured auth provider adapter module.

validate_basic(username, password)

Validates HTTP basic auth credentials and returns the authenticated scope.

Returns {:ok, scope} on success or {:error, reason} on failure.

validate_bearer(token)

Validates a bearer token and returns the authenticated scope.

Returns {:ok, scope} on success or {:error, reason} on failure.