Skip to content

Commit

Permalink
use clone() insteaf of to_string() when accessing issuer
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Engelhardt <[email protected]>
  • Loading branch information
antonengelhardt committed May 6, 2024
1 parent ada5db2 commit ce61e4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl Context for OidcDiscovery {
open_id_config: Arc::new(OpenIdConfig {
auth_endpoint: auth_endpoint.clone(),
token_endpoint: token_endpoint.clone(),
issuer: issuer.to_string(),
issuer: issuer.clone(),
public_keys: keys,
}),
plugin_config: plugin_config.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl ConfiguredOidc {
// Define allowed issuers and audiences
let mut allowed_issuers = HashSet::new();
// remove last slash from issuer url
allowed_issuers.insert(self.open_id_config.issuer.to_string());
allowed_issuers.insert(self.open_id_config.issuer.clone());
let mut allowed_audiences = HashSet::new();
allowed_audiences.insert(self.plugin_config.audience.to_string());

Expand Down

0 comments on commit ce61e4a

Please sign in to comment.