Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ protected AuthenticationInfo queryForAuthenticationInfo(AuthenticationToken toke

/**
* Get groups from LDAP.
*
*
* @param principals
* the principals of the Subject whose AuthenticationInfo should
* be queried from the LDAP server.
Expand Down Expand Up @@ -353,8 +353,8 @@ protected Set<String> rolesFor(PrincipalCollection principals, String userNameIn
byte[] cookie = null;
try {
ldapCtx.addToEnvironment(Context.REFERRAL, "ignore");
ldapCtx.setRequestControls(new Control[]{new PagedResultsControl(pageSize,

ldapCtx.setRequestControls(new Control[]{new PagedResultsControl(pageSize,
Control.NONCRITICAL)});

do {
Expand All @@ -376,7 +376,7 @@ protected Set<String> rolesFor(PrincipalCollection principals, String userNameIn
final SearchResult group = searchResultEnum.next();

Attribute attribute = group.getAttributes().get(getGroupIdAttribute());
String groupName = attribute.get().toString();
String groupName = attribute.get().toString();

String roleName = roleNameFor(groupName);
if (roleName != null) {
Expand Down Expand Up @@ -601,7 +601,7 @@ public void setGroupIdAttribute(String groupIdAttribute) {

/**
* Set Member Attribute Template for LDAP.
*
*
* @param template
* DN template to be used to query ldap.
* @throws IllegalArgumentException
Expand Down Expand Up @@ -658,7 +658,7 @@ public String getUserSearchAttributeName() {

/**
* Set User Search Attribute Name for LDAP.
*
*
* @param userSearchAttributeName
* userAttribute to search ldap.
*/
Expand Down Expand Up @@ -718,14 +718,14 @@ boolean isUserMemberOfDynamicGroup(LdapName userLdapDn, String memberUrl,
LdapName searchBaseDn = new LdapName(searchBaseString);

// do scope test
if (searchScope.equalsIgnoreCase("base")) {
if ("base".equalsIgnoreCase(searchScope)) {
log.debug("DynamicGroup SearchScope base");
return false;
}
if (!userLdapDn.toString().endsWith(searchBaseDn.toString())) {
return false;
}
if (searchScope.equalsIgnoreCase("one") && (userLdapDn.size() != searchBaseDn.size() - 1)) {
if ("one".equalsIgnoreCase(searchScope) && (userLdapDn.size() != searchBaseDn.size() - 1)) {
log.debug("DynamicGroup SearchScope one");
return false;
}
Expand All @@ -737,7 +737,7 @@ boolean isUserMemberOfDynamicGroup(LdapName userLdapDn, String memberUrl,
NamingEnumeration<SearchResult> searchResultEnum = null;
try {
searchResultEnum = systemLdapCtx.search(userLdapDn, searchFilter,
searchScope.equalsIgnoreCase("sub") ? SUBTREE_SCOPE : ONELEVEL_SCOPE);
"sub".equalsIgnoreCase(searchScope) ? SUBTREE_SCOPE : ONELEVEL_SCOPE);
if (searchResultEnum.hasMore()) {
return true;
}
Expand All @@ -759,7 +759,7 @@ public String getPrincipalRegex() {

/**
* Set Regex for Principal LDAP.
*
*
* @param regex
* regex to use to search for principal in shiro.
*/
Expand Down