Skip to content

Commit

Permalink
chore: prepare for crate publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Mar 29, 2024
1 parent e833d95 commit 0c5b964
Show file tree
Hide file tree
Showing 28 changed files with 46 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ jobs:
- name: Install stable toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- run: cargo publish -p baffao-core
- run: cargo publish -p baffao
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'baffao-core'",
"name": "Debug unit tests in library 'baffao'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=baffao-core"
"--package=baffao"
],
"filter": {
"name": "baffao-core",
"name": "baffao",
"kind": "lib"
}
},
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
resolver = "2"

members = [
"baffao-core",
"baffao",
"baffao-proxy",
]
22 changes: 0 additions & 22 deletions baffao-core/Cargo.toml

This file was deleted.

7 changes: 3 additions & 4 deletions baffao-proxy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "baffao-proxy"
version = "0.1.0"
version = "0.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
publish = false

[dependencies]
axum = "0.7.4"
axum-extra = { version = "0.9.2", features = ["typed-header", "cookie"] }
baffao-core = { path = "../baffao-core" }
baffao = { path = "../baffao" }
config = "0.14.0"
hyper = { version = "1.2.0", features = ["full"] }
hyper-util = { version = "0.1.3", features = ["client-legacy"] }
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use axum::{
routing::{any, get},
Router,
};
use baffao_core::oauth::OAuthHttpHandler;
use baffao::oauth::OAuthHttpHandler;
use hyper_util::{client::legacy::connect::HttpConnector, rt::TokioExecutor};
use std::time::Duration;
use tokio::signal;
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
response::{IntoResponse, Redirect},
};
use axum_extra::extract::CookieJar;
use baffao_core::{
use baffao::{
handlers::{oauth2_authorize, oauth2_callback, AuthorizationCallbackQuery, AuthorizationQuery},
oauth::OAuthHttpHandler,
};
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use axum::{
response::IntoResponse,
};
use axum_extra::extract::CookieJar;
use baffao_core::{handlers::proxy, oauth::OAuthHttpHandler};
use baffao::{handlers::proxy, oauth::OAuthHttpHandler};

use crate::settings::Settings;
use crate::state::HttpClient;
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/session.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use axum::{extract::State, response::IntoResponse, Json};
use axum_extra::extract::cookie::CookieJar;
use baffao_core::{handlers::get_session_from_cookie, session::Session};
use baffao::{handlers::get_session_from_cookie, session::Session};
use serde::Serialize;

use crate::settings::Settings;
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use config::{Config, ConfigError, Environment, File};
use serde::Deserialize;
use std::env;

use baffao_core::{
use baffao::{
oauth::OAuthConfig,
settings::{JwtConfig, ServerConfig},
};
Expand Down
2 changes: 1 addition & 1 deletion baffao-proxy/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use axum::{body::Body, extract::FromRef};
use baffao_core::oauth::OAuthHttpHandler;
use baffao::oauth::OAuthHttpHandler;
use hyper_util::client::legacy::connect::HttpConnector;

use crate::settings::Settings;
Expand Down
28 changes: 28 additions & 0 deletions baffao/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "baffao"
version = "0.0.1"
authors = ["CerberAuth <[email protected]>"]
repository = "https://github.com/cerberauth/baffao"
homepage = "https://github.com/cerberauth/baffao"
documentation = "https://github.com/cerberauth/baffao"
keywords = ["proxy", "oauth2", "authentication", "authorization", "auth"]
license = "MIT"
description = "BAckend For Frontend for your SPA authentication and authorization."
edition = "2021"
readme = "../README.md"

[dependencies]
anyhow = "1.0.80"
axum-extra = { version = "0.9.2", features = ["cookie"] }
base64 = "0.22.0"
chrono = "0.4.35"
config = "0.14.0"
cookie = "0.18.0"
hex = "0.4.3"
http = "1.1.0"
jsonwebtoken = "9.2.0"
oauth2 = "4.4.2"
reqwest = "0.11.24"
ring = "0.17.8"
serde = "1.0.197"
serde_json = "1.0.114"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0c5b964

Please sign in to comment.