From 13ae11ed940ac5199f8a0378f5d3389bd48c89e0 Mon Sep 17 00:00:00 2001 From: marcelocamanho Date: Wed, 27 Oct 2021 19:28:08 -0300 Subject: [PATCH] fix formatting Signed-off-by: marcelocamanho --- .../com/tngtech/keycloakmock/impl/handler/TokenRoute.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mock/src/main/java/com/tngtech/keycloakmock/impl/handler/TokenRoute.java b/mock/src/main/java/com/tngtech/keycloakmock/impl/handler/TokenRoute.java index 570e811..2f9f631 100644 --- a/mock/src/main/java/com/tngtech/keycloakmock/impl/handler/TokenRoute.java +++ b/mock/src/main/java/com/tngtech/keycloakmock/impl/handler/TokenRoute.java @@ -120,14 +120,15 @@ private void handlePasswordFlow(RoutingContext routingContext) { private void handleClientCredentialsFlow(RoutingContext routingContext) { String clientId = routingContext.request().getFormAttribute("client_id"); String password = routingContext.request().getFormAttribute("client_secret"); - boolean formBasedAuth = clientId != null && !clientId.isEmpty() && password != null && !password.isEmpty(); + boolean formBasedAuth = + clientId != null && !clientId.isEmpty() && password != null && !password.isEmpty(); final User user = routingContext.user(); if (user == null && !formBasedAuth) { routingContext.fail(401); return; } - //if not form based, try using user (BASIC auth or custom) + // if not form based, try using user (BASIC auth or custom) if (!formBasedAuth) { clientId = routingContext.user().get("username"); // Password is a list of roles