Crates.io | fake-oauth |
lib.rs | fake-oauth |
version | 0.3.0 |
source | src |
created_at | 2024-02-22 23:00:24.66305 |
updated_at | 2024-02-25 22:10:36.466908 |
description | A fake OAuth implementation good for testing environment |
homepage | https://github.com/mattiapenati/fake-oauth |
repository | https://github.com/mattiapenati/fake-oauth |
max_upload_size | |
id | 1149837 |
size | 94,072 |
A fake OAuth implementation good for testing environment. Fake users with customized claims can be defined to test your application with different profile or to reproduce the production environment without compromising the security of your systems.
If cargo is installed, fake-oauth can be installed with it:
$ cargo install fake-oauth
Alternatively you can run fake-oauth docker image using the following command:
$ docker run -p 7160:7160 ghcr.io/mattiapenati/fake-oauth
It is quite easy to configure the fake-oauth. The behaviour of the server can be customized using the enviroment variables:
FAKE_OAUTH_ADDR
: the listening address of the server (default:
[::1]:7160
).FAKE_OAUTH_ISSUER
: the server address, it can be changed if the service is
reachable using an address different from the default one
http://localhost:{local_port}
.FAKE_OAUTH_USERS
: the path of the toml file used to configure the users
(default: /var/lib/fake-oauth/users.toml
).File users.toml
contains the definition of the user, each user is identified
by its id (sub
field of access token) and you can define its metadata used to
populate the token claims. Look at assets/users.toml
file for an example.
Licensed under either of Apache License 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.