use of org.xdi.ldap.model.CustomAttribute in project oxAuth by GluuFederation.
the class AuthenticationService method checkUserStatus.
private boolean checkUserStatus(User user) {
CustomAttribute userStatus = userService.getCustomAttribute(user, "gluuStatus");
if ((userStatus != null) && GluuStatus.ACTIVE.equals(GluuStatus.getByValue(userStatus.getValue()))) {
return true;
}
log.warn("User '{}' was disabled", user.getUserId());
return false;
}
use of org.xdi.ldap.model.CustomAttribute in project oxAuth by GluuFederation.
the class ClientService method setCustomAttribute.
public void setCustomAttribute(Client client, String attributeName, String attributeValue) {
org.xdi.ldap.model.CustomAttribute customAttribute = getCustomAttribute(client, attributeName);
if (customAttribute == null) {
customAttribute = new org.xdi.ldap.model.CustomAttribute(attributeName);
client.getCustomAttributes().add(customAttribute);
}
customAttribute.setValue(attributeValue);
}
Aggregations