diff options
Diffstat (limited to 'src/main/java/org/openslx/satserver/util/LdapMapping.java')
-rw-r--r-- | src/main/java/org/openslx/satserver/util/LdapMapping.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/LdapMapping.java b/src/main/java/org/openslx/satserver/util/LdapMapping.java new file mode 100644 index 0000000..f734a1d --- /dev/null +++ b/src/main/java/org/openslx/satserver/util/LdapMapping.java @@ -0,0 +1,44 @@ +package org.openslx.satserver.util; + +import com.google.gson.annotations.Expose; + +public class LdapMapping +{ + @Expose + public String uid; // AD: sAMAccountName + @Expose + public String homemount; // AD: homeDirectory + @Expose + public String localhome; // AD: none, LDAP: homeDirectory + @Expose + public String posixAccount; // AD: user + @Expose + public String shadowAccount; // AD: user + @Expose + public String uidnumber; // AD: objectSid + + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(); + if ( !Util.isEmpty( uid ) ) { + sb.append( "map.uid=" + uid + "\n" ); + } + if ( !Util.isEmpty( homemount ) ) { + sb.append( "map.homemount=" + homemount + "\n" ); + } + if ( !Util.isEmpty( localhome ) ) { + sb.append( "map.localhome=" + localhome + "\n" ); + } + if ( !Util.isEmpty( posixAccount ) ) { + sb.append( "map.posixAccount=" + posixAccount + "\n" ); + } + if ( !Util.isEmpty( shadowAccount ) ) { + sb.append( "map.shadowAccount=" + shadowAccount + "\n" ); + } + if ( !Util.isEmpty( uidnumber ) ) { + sb.append( "map.uidnumber=" + uidnumber + "\n" ); + } + return sb.toString(); + } +}
\ No newline at end of file |