Skip to content

Commit

Permalink
Merge pull request #10 from Authress/add-openid-configuration-properties
Browse files Browse the repository at this point in the history
Fix jwk_uri path.
  • Loading branch information
wparad authored Dec 28, 2023
2 parents 4324f98 + 8c326c5 commit f52b062
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/server/authentication_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ pub struct JwkList {

#[derive(Debug, Serialize, Deserialize)]
pub struct OpenIdConfiguration {
pub jwk_uri: String
pub jwks_uri: String,
pub token_endpoint: String,
pub authorization_endpoint: String
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down Expand Up @@ -52,7 +54,9 @@ impl AuthenticationController {

pub fn get_openid_configuration(&self, host: &str) -> OpenIdConfiguration {
return OpenIdConfiguration {
jwk_uri: format!("https//{host}/.well-known/openid-configuration/jwks")
jwks_uri: format!("http://{host}/.well-known/openid-configuration/jwks"),
authorization_endpoint: format!("http://{host}"),
token_endpoint: format!("http://{host}/api/authentication/oauth/tokens"),
};
}

Expand Down

0 comments on commit f52b062

Please sign in to comment.