-
Notifications
You must be signed in to change notification settings - Fork 306
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
PAYARA-2627 remove X500 class #3187
Conversation
… and other parts of the code base
…o smillidge-PAYARA-2627
Jenkins test please |
Quick build and test passed! |
// Set the transport principal in subject and | ||
// return the X500Principal class | ||
securityContext = new SecurityContext(); | ||
X500Principal x500Name = (X500Principal) certChain[0].getSubjectX500Principal(); |
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.
X500Principal x500principal
@@ -207,7 +208,7 @@ public static void doX500Login(Subject subject, String appModuleID) throws Login | |||
String user = null; | |||
String realmName = null; | |||
try { | |||
X500Name x500name = getPublicCredentials(subject, X500Name.class); | |||
X500Principal x500name = (X500Principal)getPublicCredentials(subject, X500Principal.class); |
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.
X500Principal x500Name
Plus, is cast needed?
@@ -132,70 +132,69 @@ protected void init(Properties props) throws BadRealmException, NoSuchRealmExcep | |||
* @return Description of the kind of authentication that is directly supported by this realm. | |||
*/ | |||
@Override | |||
public String getAuthType() { | |||
public String getAuthType() | |||
{ |
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.
Weird bracing
public void authenticate(Subject subject, X500Name x500name) { | ||
|
||
public void authenticate(Subject subject, X500Principal x500name) | ||
{ |
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.
Weird bracing
* | ||
* @param subject The Subject object for the authentication request. | ||
* @param x500name The X500Name object from the user certificate. | ||
* | ||
*/ | ||
public void authenticate(Subject subject, X500Name x500name) { | ||
|
||
public void authenticate(Subject subject, X500Principal x500name) |
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.
X500Principal x500Principal
|
||
if (!subject.getPrincipals().isEmpty()) { | ||
subject.getPublicCredentials().add(new DistinguishedPrincipalCredential(x500name)); | ||
DistinguishedPrincipalCredential dpc = new DistinguishedPrincipalCredential(x500name); |
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.
Don't use names like dpc
, agy
, opo
, etc
In this case the intermediate variable also isn't really needed.
v.add(groups[i]); | ||
} | ||
private void setGroupNames(String username, String[] groups) | ||
{ |
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.
Weird bracing
} | ||
private void setGroupNames(String username, String[] groups) | ||
{ | ||
LinkedList v = new LinkedList(); |
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.
Avoid names like v
, z
, o
, etc.
} | ||
} | ||
grpList = addAssignGroups(grpList); | ||
grpList = this.addMappedGroupNames(grpList); | ||
setGroupNames(_username, grpList); | ||
|
||
if (_logger.isLoggable(Level.FINE)) { | ||
_logger.log(Level.FINE, "LDAP: login succeeded for: " + _username); | ||
if(_logger.isLoggable(Level.FINE)){ |
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.
formatting; needs spaces
Jenkins test please |
Quick build and test failed! |
jenkins test please |
Quick build and test failed! |
Jenkins test please |
Quick build and test passed! |
Jenkins test please |
Quick build and test passed! |
PAYARA-2627 remove X500 class
No description provided.