6.2.1 setProperty()
The setProperty() method inserts a property (string) into the SRPrincipal object. The sample below uses setProperty() within a Login Listener:
import inetsoft.sree.security.*;
public class MyLoginListener implements LoginListener {
public void userLogin(LoginEvent event) {
SRPrincipal prin = event.getPrincipal();
prin.setProperty("myprop", "myval");
}
}
The corresponding getProperty() method allows you to retrieve a property value.
prin.getProperty("myprop")
In a non-SSO setting, set the '__internal__' property when you create the SRPrincipal object, as shown below:
SRPrincipal prin = new SRPrincipal(user,...);
prin.setProperty("__internal__", "true");
| << 6.2 SRPrincipal Properties | © 1996-2013 InetSoft Technology Corporation (v11.5) | 6.2.2 setParameter() >> |