Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Guida Utente Pagina 314

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 313
Appendix A: Samples of User Program Descriptions
A-16
Changing the User Validity Period
This sample program assumes the environment setup below. Change the setup according to the actual
environment used.
The public directory for creation of the repository is "ou=interstage,o=fujitsu,dc=com".
The storage location of user information is "ou=User,ou=interstage,o=fujitsu,dc=com".
RDN of user information is expressed by "cn".
The name of the user whose validity period is to be changed is specified for "user" in
java.lang.String.
The validity period start time is specified for "before" in java.lang.String.
The validity period end time is specified for "after" in java.lang.String.
The result of common pre-processing is used as the value of "ctx".
Description of User Program
Example
Pre-processing
:
String dn = "cn=" + user + ",ou=User,ou=interstage,o=fujitsu,dc=com";
ModificationItem[] mods = new ModificationItem[2];
mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,
new BasicAttribute("ssoNotBefore",
before));
mods[1] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,
new BasicAttribute("ssoNotAfter",
after));
ctx.modifyAttributes(dn, mods);
:
Postprocessing
Vedere la pagina 313
1 2 ... 309 310 311 312 313 314 315 316 317 318 319 ... 331 332

Commenti su questo manuale

Nessun commento