The fusion_auth library provides an Elixir API for accessing the FusionAuth Developer APIs.
The following are the APIs that are currently implemented:
- Actioning Users
- Applications
- Audit Logs
- Consent
- Emails
- Event Logs
- Families
- Groups
- Identity Providers
- Integrations
- JWT
- Keys
- Login
- Passwordless
- Registrations
- Reports
- System
- Tenants
- Themes
- Two Factor
- Users
- User Actions
- User Action Reasons
- User Comments
- Webhooks
The API access uses the Tesla library and relies on the caller passing in a FusionAuth base URL, API Key and Tenant ID to create a client. The client is then passed into all API calls.
The API returns a 3 element tuple. If the API HTTP status code is less
the 300 (ie. suceeded) it returns :ok
, the HTTP body as a map and the full
Tesla Env if you need to access more data about the return. If the API HTTP
status code is greater than 300. it returns :error
, the HTTP body and the
Telsa Env. If the API doesn't return at all it should return :error
, a blank
map and the error from Tesla.
If available in Hex, the package can be installed
by adding fusion_auth
to your list of dependencies in mix.exs
:
def deps do
[
{:fusion_auth, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/fusion_auth.
MIT License
Copyright (c) 2020 LEO Technologies, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.