-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major upgrade and refactor #15
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3e8a347
Bare-bones integration with core
masongup-mdsol fff2825
Remove more unneeded stuff
masongup-mdsol 6011bd7
Refactor for improved mauth-core errors
masongup-mdsol 4cbc019
Split code into multiple files, fix tests and doc tests
masongup-mdsol 2bbfdf8
Improve docs
masongup-mdsol a85de4c
Rustfmt
masongup-mdsol 88ad9c0
Bump version
masongup-mdsol 4c820c9
Make check happy on non-service feature
masongup-mdsol 3fb5105
Allow accepting private key data directly
masongup-mdsol e739e58
Swap over to GHA and remove Travis
masongup-mdsol ea47b24
Add config example
masongup-mdsol 38fb296
Impl default for the config file section
masongup-mdsol 86fbd6b
Improve outgoing request API
masongup-mdsol d0f07f8
Better docs
masongup-mdsol bd6a876
Incoming should not base64 decode, core handles that
masongup-mdsol 65fc0d0
Depend on released mauth-core
masongup-mdsol 406f771
Fix fmt and clippy in CI
masongup-mdsol 35a3f58
Clippy again
masongup-mdsol d26ddf8
Improve crate dependencies
masongup-mdsol d317a87
Format fix
masongup-mdsol b00e86b
Adjust doctest requires
masongup-mdsol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
rustfmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- name: Rustfmt Check | ||
uses: actions-rust-lang/rustfmt@v1 | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy | ||
- name: Clippy Check | ||
run: cargo clippy --all-targets --all-features | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
concurrency: | ||
# Cancel intermediate builds | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run tests | ||
run: | | ||
cargo test --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build + Publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- run: cargo publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "mauth-client" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
authors = ["Mason Gup <[email protected]>"] | ||
edition = "2021" | ||
documentation = "https://docs.rs/mauth-client/" | ||
|
@@ -13,31 +13,25 @@ keywords = ["security", "authentication", "web"] | |
categories = ["authentication", "web-programming"] | ||
|
||
[dependencies] | ||
ring = ">= 0.17.7" | ||
reqwest = { version = ">= 0.11.23", features = ["json"] } | ||
url = ">= 2.5.0" | ||
serde = { version = ">= 1.0.85", features = ["derive"] } | ||
serde_json = ">= 1.0.0" | ||
serde_yaml = ">= 0.8.0" | ||
uuid = { version = ">= 0.21.0", features = ["v4"] } | ||
dirs = ">= 2.0.0" | ||
base64 = ">= 0.10.0" | ||
chrono = ">= 0.4.0" | ||
percent-encoding = ">= 2.0.0" | ||
tokio = { version = ">= 1.0.1", features = ["fs"] } | ||
sha2 = ">= 0.9.0" | ||
hex = ">= 0.4.0" | ||
openssl = ">= 0.10.0" | ||
regex = { version = "1", default_features = false, features = ["std"] } | ||
bytes = ">= 1.0.0" | ||
http = ">= 1.0.0" | ||
tower = { version = ">= 0.4.13", optional = true } | ||
reqwest = { version = "0.12", features = ["json"] } | ||
url = "2" | ||
serde = { version = "1", features = ["derive"] } | ||
serde_json = "1" | ||
serde_yml = "0.0.10" | ||
uuid = { version = "1", features = ["v4"] } | ||
dirs = "5" | ||
chrono = "0.4" | ||
tokio = { version = "1", features = ["fs"] } | ||
tower = { version = "0.4", optional = true } | ||
axum = { version = ">= 0.7.2", optional = true } | ||
futures-core = { version = ">= 0.3.25", optional = true } | ||
thiserror = ">= 1.0.37" | ||
futures-core = { version = "0.3", optional = true } | ||
http = { version = "1", optional = true } | ||
bytes = { version = "1", optional = true } | ||
thiserror = "1" | ||
mauth-core = "0.5" | ||
|
||
[dev-dependencies] | ||
tokio = { version = ">= 1.0.1", features = ["rt-multi-thread", "macros"] } | ||
tokio = { version = "1", features = ["rt-multi-thread", "macros"] } | ||
|
||
[features] | ||
axum-service = ["tower", "futures-core", "axum"] | ||
axum-service = ["tower", "futures-core", "axum", "http", "bytes"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this example should include the
use
statements or maybe we should have anexamples/main.rs
file with something that compiles and worksThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is generated from this doc test which is compiled as part of the CI test suite.
Making an example that works is problematic, since that would require an actual MAuth URL and valid private key to be stored in this public repo. I suppose I can modify it to allow the
use
statements to be shown though.