-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kc change #1062
Kc change #1062
Conversation
boolean isExistingSession = existingSession == null ? false | ||
: existingSession.getAttribute("USER") == null ? false : true; | ||
|
||
System.out.println("Auth-path=" + requestPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
uri = new URI(requestUriStr); | ||
} catch (URISyntaxException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to log exception as error.
|
||
@Override | ||
public String getFilterName() { | ||
// TODO Auto-generated method stub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Minor] remove auto-generated comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will delete this file. Not used
|
||
@Override | ||
public void init(FilterConfig filterConfig) throws ServletException { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Minor] Remove blank lines.
boolean isExistingSession = existingSession == null ? false | ||
: existingSession.getAttribute("USER") == null ? false : true; | ||
|
||
System.out.println("Auth-path=" + requestPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use logger rather than System.out
switch (name) { | ||
case "keycloak.config.skipPattern": | ||
return null; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Minor] remove blank lines
|
||
File f = new File(System.getProperty("karaf.etc"), "/config/" + "keycloak.json"); | ||
try { | ||
FileInputStream keyCloakJsonFile = new FileInputStream(f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use try-with-resources for IO resources
String userName = token.getPreferredUsername(); | ||
userName = userName == null ? token.getEmail() : userName; | ||
String email = token.getEmail(); | ||
String givenName = token.getGivenName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two statements (givenName and lastName retrieval) can be moved after line 96 as only utilised there, or used in-line on line 97 directly. Reduces scope, and provides a slight performance improvement in the alternate use case (when userType != null).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes, as indicated.
<bundle>mvn:org.keycloak/keycloak-servlet-filter-adapter/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-core/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-common/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-adapter-spi/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-servlet-adapter-spi/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-adapter-core/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-servlet-filter-adapter/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-authz-client/14.0.0</bundle> | ||
<bundle>mvn:org.keycloak/keycloak-osgi-adapter/14.0.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the keycloak.version property in ApromoreCore/pom.xml and use ${keycloak.version} instead of 14.0.0
Apromore-Core-Components/Apromore-Portal/src/main/webapp/WEB-INF/zk.xml
Outdated
Show resolved
Hide resolved
...onents/Apromore-Portal/src/main/java/org/apromore/portal/servlet/filter/FilterRegexUtil.java
Show resolved
Hide resolved
...tal/src/main/java/org/apromore/portal/security/KeycloakLoginUrlAuthenticationEntryPoint.java
Outdated
Show resolved
Hide resolved
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-servlet-filter-adapter</artifactId> | ||
<version>14.0.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update keycloak.version in ApromoreCore/pom.xml and use ${keycloak.version}
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-osgi-adapter</artifactId> | ||
<version>14.0.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update keycloak.version in ApromoreCore/pom.xml and use ${keycloak.version}
No description provided.