A OpenID Connect Client Libary for axum
Find a file
Paul Zinselmeyer 23ce67640a
Add new example structure to v0.2
This commit adds the new example structure with CI to this version.
2024-04-18 15:51:57 +02:00
.github/workflows Add new example structure to v0.2 2024-04-18 15:51:57 +02:00
examples/basic Add new example structure to v0.2 2024-04-18 15:51:57 +02:00
src feat: Handle Grant error while refreshing token 2024-01-20 21:35:19 +01:00
.gitignore Add new example structure to v0.2 2024-04-18 15:51:57 +02:00
Cargo.toml increment minor version 2024-01-23 14:21:47 +01:00
README.md Add new example structure to v0.2 2024-04-18 15:51:57 +02:00

THIS IS AN OLD VERSION! PLEASE USE THE LATEST VERSION IF POSSIBLE!

This Library allows using OpenID Connect with axum. It authenticates the user with the OpenID Conenct Issuer and provides Extractors.

Usage

The OidcAuthLayer must be loaded on any handler that might use the extractors. The user won't be automatically logged in using this layer. If a valid session is found, the extractors will return the correct value and fail otherwise.

The OidcLoginLayer should be loaded on any handler on which the user is supposed to be authenticated. The User will be redirected to the OpenId Conect Issuer to authenticate. The extractors will always return a value.

The OidcClaims-extractor can be used to get the OpenId Conenct Claims. The OidcAccessToken-extractor can be used to get the OpenId Connect Access Token.

Your OIDC-Client must be allowed to redirect to every subpath of your application base url.

Examples

Take a look at the examples folder for examples.

Example Projects

Here is a place for projects that are using this library.

Contributing

I'm happy about any contribution in any form. Feel free to submit feature requests and bug reports using a GitHub Issue. PR's are also appreciated.

License

This Library is licensed under LGPLv3.