ExFTP.Auth.Common (ExFTP v1.0.4)
View SourceA module describing types functions common across all ExFTP.Authenticator
Summary
Types
HTTP method paired with authenticated_url/0
How many milliseconds pass before a user's session is not assumed still-authenticated.
A URL used to check if a user should still be considered authenticated
An HTTP method to use in a request.
HTTP method paired with login_url/0
A URL used to log in a user
Functions
Cleans keys and values of a given map in preparation to build into a config
Grabs the authenticator_config
from Application.get_env/2
and validates it.
Types
@type authenticated_method() :: http_method()
HTTP method paired with authenticated_url/0
๐ See Also
@type authenticated_ttl_ms() :: integer()
How many milliseconds pass before a user's session is not assumed still-authenticated.
๐ See Also
A URL used to check if a user should still be considered authenticated
๐ See Also
@type http_method() ::
:get | :head | :post | :put | :connect | :delete | :options | :trace | :patch
An HTTP method to use in a request.
๐ See Also
@type login_method() :: http_method()
HTTP method paired with login_url/0
๐ See Also
A URL used to log in a user
๐ See Also
Functions
Cleans keys and values of a given map in preparation to build into a config
๐ท๏ธ Params
- m :: A map to prepare before building into a config
Grabs the authenticator_config
from Application.get_env/2
and validates it.
๐ท๏ธ Params
- mod :: A module to validate against (e.g
ExFTP.Auth.BasicAuthConfig
)
โคต๏ธ Returns
โ On Success
`{:ok, config}`
โ On Failure
`{:error, desc}`