Skip to content

Commit f58b406

Browse files
committed
chore: Updates to rextendr and prepares for CRAN release
1 parent 0de0304 commit f58b406

File tree

14 files changed

+63
-40
lines changed

14 files changed

+63
-40
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
^src/Makevars$
1717
^src/Makevars\.win$
1818
^Taskfile.yml$
19+
^src/rust/target$

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ jobs:
5050
with:
5151
upload-snapshots: true
5252
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
53+
env:
54+
NOT_CRAN: false

DESCRIPTION

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Depends: R (>= 4.2.0)
1717
Imports:
1818
glue,
1919
promises,
20-
purrr,
21-
stats,
2220
stringr,
2321
shiny,
2422
later,
@@ -36,4 +34,4 @@ Encoding: UTF-8
3634
Roxygen: list(markdown = TRUE)
3735
RoxygenNote: 7.3.2
3836
Config/rextendr/version: 0.3.1.9001
39-
SystemRequirements: Cargo (Rust's package manager), rustc
37+
SystemRequirements: Cargo (Rust's package manager), rustc, OpenSSL >= 1.0.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ connections are started until the user is authenticated. It also prevents
117117
sensitive data in the UI portion of the application from being exposed to
118118
unauthenticated users.
119119

120-
![Auth Flow](man/flow.png)
120+
![Auth Flow](vignettes/flow.png)

Taskfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
tasks:
77
clean:
88
- rm -rf src/.cargo
9-
- rm -rf orbweaver_*.tar.gz
9+
- rm -rf tapLock_*.tar.gz
1010
vendor:
1111
dir: src/rust
1212
deps:
@@ -40,4 +40,4 @@ tasks:
4040
- clean
4141
cmds:
4242
- R CMD build .
43-
- R CMD check orbweaver*.tar.gz
43+
- R CMD check tapLock*.tar.gz

src/Makevars.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TARGET_DIR = ./rust/target
22
LIBDIR = $(TARGET_DIR)/release
3-
STATLIB = $(LIBDIR)/libtapLock.a
4-
PKG_LIBS = -L$(LIBDIR) -ltapLock
3+
STATLIB = $(LIBDIR)/libtap_lock.a
4+
PKG_LIBS = -L$(LIBDIR) -ltap_lock
55

66
all: C_clean
77

src/Makevars.win.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu
22

33
TARGET_DIR = ./rust/target
44
LIBDIR = $(TARGET_DIR)/$(TARGET)/release
5-
STATLIB = $(LIBDIR)/libtapLock.a
6-
PKG_LIBS = -L$(LIBDIR) -ltapLock -lws2_32 -lntdll -lbcrypt -luserenv
5+
STATLIB = $(LIBDIR)/libtap_lock.a
6+
PKG_LIBS = -L$(LIBDIR) -ltap_lock -lws2_32 -lntdll -lbcrypt -luserenv
77

88
all: C_clean
99

src/rust/Cargo.lock

Lines changed: 23 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rust/Cargo.toml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
[package]
2-
name = 'tapLock'
2+
name = 'tap_lock'
33
publish = false
44
version = '0.1.0'
55
edition = '2021'
66

77
[lib]
88
crate-type = [ 'staticlib' ]
9-
name = 'tapLock'
9+
name = 'tap_lock'
1010

1111
[dependencies]
1212
async-trait = "0.1.87"
13-
extendr-api = { version = '0.7.1', features = ["serde", "result_condition"] }
13+
extendr-api = { version = '0.8', features = ["serde", "result_condition"] }
1414
jsonwebtoken = "9.3.1"
1515
oauth2 = { version = "5.0.0", features = ["reqwest"] }
1616
reqwest = { version = "0.12.14", features = ["json", "rustls-tls"], default-features = false }
1717
serde = { version = "1.0.219", features = ["derive"] }
1818
serde_json = "1.0.140"
1919
tokio = { version = "1.44.1", features = ["rt-multi-thread"] }
2020
urlencoding = "2.1.3"
21+
22+
[package.metadata.vendor-filter]
23+
platforms = [
24+
# Linux
25+
"x86_64-unknown-linux-gnu",
26+
"aarch64-unknown-linux-gnu",
27+
# Windows
28+
"x86_64-pc-windows-gnu",
29+
# MacOS
30+
"x86_64-apple-darwin",
31+
"aarch64-apple-darwin"
32+
]
33+
all-features = true

src/rust/src/entra_id.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::sync::{Arc, Mutex};
1414

1515
use crate::{OAuth2Client, OAuth2Error, OAuth2Response};
1616

17-
const JWKS_URL: &'static str = "https://login.microsoftonline.com/common/discovery/keys";
17+
const JWKS_URL: &str = "https://login.microsoftonline.com/common/discovery/keys";
1818

1919
#[derive(Debug, Deserialize, Serialize, Clone)]
2020
struct AzureADTokenResponseExtra {
@@ -43,18 +43,17 @@ pub struct AzureADOAuth2Client {
4343
client_id: String,
4444
jwks: Arc<Mutex<JwkSet>>,
4545
use_refresh_token: bool,
46-
tenant_id: String, // Add tenant ID
46+
_tenant_id: String,
4747
}
4848

4949
impl AzureADOAuth2Client {
5050
fn get_jwk(&self, kid: &str) -> Option<jsonwebtoken::jwk::Jwk> {
5151
let jwks = self.jwks.lock().expect("mutex should not be poissoned");
52-
jwks.find(&kid).cloned()
52+
jwks.find(kid).cloned()
5353
}
5454
}
5555

5656
async fn fetch_jwks(reqwest_client: &reqwest::Client) -> Result<JwkSet, OAuth2Error> {
57-
eprintln!("Refreshing JwkSet");
5857
let jwks = reqwest_client
5958
.get(JWKS_URL)
6059
.send()
@@ -148,7 +147,7 @@ pub async fn build_oauth2_state_azure_ad(
148147
jwks,
149148
client_id: client_id.to_string(),
150149
use_refresh_token,
151-
tenant_id: tenant_id.to_string(), // Store tenant ID
150+
_tenant_id: tenant_id.to_string(), // Store tenant ID
152151
})
153152
}
154153

0 commit comments

Comments
 (0)