Skip to content
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

Merged
merged 5 commits into from
Oct 4, 2018

Conversation

Cousjava
Copy link
Contributor

No description provided.

@Cousjava Cousjava added this to the Payara 5.184 milestone Sep 21, 2018
@Cousjava
Copy link
Contributor Author

Jenkins test please

@payara-ci
Copy link
Contributor

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();
Copy link
Contributor

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);
Copy link
Contributor

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()
{
Copy link
Contributor

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)
{
Copy link
Contributor

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)
Copy link
Contributor

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);
Copy link
Contributor

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)
{
Copy link
Contributor

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();
Copy link
Contributor

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)){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting; needs spaces

@Cousjava
Copy link
Contributor Author

Jenkins test please

@payara-ci
Copy link
Contributor

Quick build and test failed!

@smillidge
Copy link
Contributor

jenkins test please

@payara-ci
Copy link
Contributor

Quick build and test failed!

@Cousjava
Copy link
Contributor Author

Cousjava commented Oct 2, 2018

Jenkins test please

@payara-ci
Copy link
Contributor

Quick build and test passed!

@Pandrex247
Copy link
Member

Jenkins test please

@payara-ci
Copy link
Contributor

Quick build and test passed!

@Pandrex247 Pandrex247 merged commit a5ad2fb into payara:master Oct 4, 2018
Cousjava pushed a commit to Cousjava/Payara that referenced this pull request Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants