ReckonJwt.AuthAPI (reckon_jwt v0.2.1)
View SourceDistributed authentication API for accessing the ReckonIdentityAuth service via Swarm.
This module provides a simple proxy to the authentication orchestrator running in the identity system. It mirrors the 5 public functions of ReckonIdentityAuth and forwards calls via Swarm cluster management.
Usage
# Full authentication
{:ok, result} = ReckonJwt.AuthAPI.authenticate(account_id, credentials, device_info, context)
# Token validation
{:ok, token_info} = ReckonJwt.AuthAPI.validate_token(token, context)
# Token refresh
{:ok, new_tokens} = ReckonJwt.AuthAPI.refresh_tokens(refresh_token, context)
# Logout
{:ok, %{logged_out: true}} = ReckonJwt.AuthAPI.logout(token, context)
# Service validation (lightweight)
{:ok, service_info} = ReckonJwt.AuthAPI.validate_service_token(token, required_scopes)
Configuration
config :reckon_jwt, ReckonJwt.AuthAPI,
call_timeout: 30_000
Summary
Functions
Generate the service name for the authentication orchestrator.
Proxy to ReckonIdentityAuth.authenticate/4
Proxy to ReckonIdentityAuth.logout/2
Proxy to ReckonIdentityAuth.refresh_tokens/2
Proxy to ReckonIdentityAuth.validate_service_token/2
Proxy to ReckonIdentityAuth.validate_token/2
Functions
Generate the service name for the authentication orchestrator.
This creates a unique identifier for each node in the cluster, allowing multiple auth services to be registered simultaneously.
Proxy to ReckonIdentityAuth.authenticate/4
Proxy to ReckonIdentityAuth.logout/2
Proxy to ReckonIdentityAuth.refresh_tokens/2
Proxy to ReckonIdentityAuth.validate_service_token/2
Proxy to ReckonIdentityAuth.validate_token/2