Package com.esri.gpt.framework.security.identity

Examples of com.esri.gpt.framework.security.identity.IdentitySupport


@Override
protected void processSubAction(ActionEvent event, RequestContext context)
  throws AbortProcessingException, Exception  {
 
  // determine the command
  IdentitySupport support = context.getIdentityConfiguration().getSupportedFunctions();
  UIComponent component = event.getComponent();
  String sCommand = Val.chkStr((String)component.getAttributes().get("command"));
 
  // execute the command
  if (sCommand.equals("changePassword")) {
    if (!support.getSupportsPasswordChange()) throw new NotAuthorizedException("Not authorized.");
    assertLoggedIn(context);
    executeChangePassword(event,context);
  } else if (sCommand.equals("recoverPassword")) {
    if (!support.getSupportsPasswordRecovery()) throw new NotAuthorizedException("Not authorized.")
    executeRecoverPassword(event,context);
  } else if (sCommand.equals("registerUser")) {
    if (!support.getSupportsUserRegistration()) throw new NotAuthorizedException("Not authorized.")
    executeRegisterUser(event,context);
  } else if (sCommand.equals("sendFeedback")) {
    executeSendFeedback(event,context);
  } else if (sCommand.equals("updateProfile")) {
    if (!support.getSupportsUserProfileManagement()) throw new NotAuthorizedException("Not authorized.")
    assertLoggedIn(context);
    executeUpdateProfile(event,context);
  }
}
View Full Code Here


    // self care support
    Node ndSupport = (Node) xpath.evaluate("selfCareSupport", ndLdap,
        XPathConstants.NODE);
    if (ndSupport != null) {
      IdentitySupport support = idConfig.getSupportedFunctions();
      support.setSupportsLogin(Val.chkBool(xpath.evaluate("@supportsLogin",
          ndSupport), true));
      support.setSupportsLogout(Val.chkBool(xpath.evaluate("@supportsLogout",
          ndSupport), true));
      support.setSupportsUserRegistration(Val.chkBool(xpath.evaluate(
          "@supportsUserRegistration", ndSupport), false));
      support.setSupportsUserProfileManagement(Val.chkBool(xpath.evaluate(
          "@supportsUserProfileManagement", ndSupport), false));
      support.setSupportsPasswordChange(Val.chkBool(xpath.evaluate(
          "@supportsPasswordChange", ndSupport), false));
      support.setSupportsPasswordRecovery(Val.chkBool(xpath.evaluate(
          "@supportsPasswordRecovery", ndSupport), false));
    }

    // roles
    Node ndRoles = (Node) xpath.evaluate("roles", ndLdap, XPathConstants.NODE);
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.identity.IdentitySupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.