Fix roles resolver (#19)

This commit is contained in:
malkoas 2022-10-12 17:56:19 +03:00 committed by GitHub
parent 0367923537
commit 6856872154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -24,10 +24,12 @@ public class RoleAccessService {
accessData.getServiceName(),
accessData.getMethodName(),
accessData.getUserEmail());
break;
} else if (role.equalsIgnoreCase(getServiceName(accessData))) {
log.info("Rights allowed in all service {} for user {}",
accessData.getServiceName(),
accessData.getUserEmail());
break;
} else {
throw new AuthorizationException(
String.format("User %s don't have access to %s in service %s",

View File

@ -30,7 +30,7 @@ public abstract class AbstractKeycloakOpenIdAsWiremockConfig {
}
protected String generateSimpleJwtWithRoles() {
return keycloakOpenIdStub.generateJwt("messages", "messages:methodName");
return keycloakOpenIdStub.generateJwt("messages", "messages:methodName", "unknown");
}
protected String generateSimpleJwtWithoutRoles() {