AshAuthentication. Oauth2Server. Supervisor
(ash_authentication_oauth2_server v0.2.1)
Copy Markdown
View Source
Supervises the background processes for an OAuth2 server.
Add this to your application's supervision tree, passing your OTP app name:
defmodule MyApp.Application do
use Application
def start(_type, _args) do
children = [
# ...
{AshAuthentication.Oauth2Server.Supervisor, otp_app: :my_app}
]
Supervisor.start_link(children, strategy: :one_for_one)
end
endOptions
:otp_app(required) — your application's OTP app name.:list_tenants— for apps usingstrategy :contextmultitenancy on the OAuth2 resources. Accepts a static list of tenant identifiers, a 0-arity function, or an{module, function, args}tuple. The expunger will run once per tenant per resource per interval. Defaults to[nil](single tenant-less pass — correct for apps with no multitenancy orglobal? trueattribute multitenancy).
Currently this supervisor starts:
AshAuthentication.Oauth2Server.Expunger— periodically removes expired authorization codes and refresh tokens from any resource extended withAshAuthentication.Oauth2Server.AuthorizationCodeResourceorAshAuthentication.Oauth2Server.RefreshTokenResource.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.