mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-15 01:13:52 +01:00
refactor: demo server (clean, refactor, docs)
This commit is contained in:
parent
43f2523ec6
commit
6ff5d88ae9
5 changed files with 56 additions and 170 deletions
|
|
@ -57,7 +57,7 @@ fn response_wwwauth(status: StatusCode, bearer: &str) -> Response<BoxBody> {
|
|||
let h = if bearer.is_empty() {
|
||||
"Bearer".to_owned()
|
||||
} else {
|
||||
format!("Bearer {}", bearer)
|
||||
format!("Bearer {bearer}")
|
||||
};
|
||||
res.headers_mut().insert(header::WWW_AUTHENTICATE, h.parse().unwrap());
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ pub struct OidcDiscovery {
|
|||
}
|
||||
|
||||
pub async fn discover_jwks(issuer: &str) -> Result<String, InitError> {
|
||||
let discovery_url = format!("{}/.well-known/openid-configuration", issuer);
|
||||
let discovery_url = format!("{issuer}/.well-known/openid-configuration");
|
||||
reqwest::Client::new()
|
||||
.get(discovery_url)
|
||||
.send()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue