Added keycloak JWK set configuration details
This commit is contained in:
@ -13,6 +13,8 @@ gsd_app_names = ["GSD-RestApi"]
|
||||
realm_url = "http://localhost:8080/realms/master"
|
||||
client_id = "delivery-app"
|
||||
client_secret = "<SECRET>"
|
||||
realm = "<REALM>>"
|
||||
base_url = "<BASE_URL>"
|
||||
auth_url = "http://localhost:8080/realms/master/protocol/openid-connect/auth"
|
||||
token_url = "http://localhost:8080/realms/master/protocol/openid-connect/token"
|
||||
redirect_url = "http://127.0.0.1:3000/callback"
|
||||
@ -31,6 +31,8 @@ pub struct Keycloak {
|
||||
pub auth_url: String,
|
||||
pub token_url: String,
|
||||
pub redirect_url: String,
|
||||
pub realm: String,
|
||||
pub base_url: String,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@ -81,6 +83,8 @@ pub fn create_standard_config() -> Config {
|
||||
realm_url: String::from("http://127.0.0.1:8080/auth/realms/master"),
|
||||
client_id: String::from("delivery-backend"),
|
||||
client_secret: String::from(""),
|
||||
realm: String::from("master"),
|
||||
base_url: String::from("http://127.0.0.1:8080"),
|
||||
auth_url: String::from(
|
||||
"http://127.0.0.1:8080/auth/realms/master/protocol/openid-connect/auth",
|
||||
),
|
||||
|
||||
@ -45,8 +45,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
let keycloak_instance: Arc<KeycloakAuthInstance> = Arc::new(KeycloakAuthInstance::new(
|
||||
KeycloakConfig::builder()
|
||||
.server(Url::parse("http://localhost:8080/").unwrap())
|
||||
.realm(String::from("master"))
|
||||
.server(Url::parse(config.keycloak.base_url.as_str()).unwrap())
|
||||
.realm(config.keycloak.realm)
|
||||
.build(),
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user