Package it.eng.spagobi.services.security.service

Examples of it.eng.spagobi.services.security.service.ISecurityServiceSupplier


  }
 
  private void authenticate(String userId, String password) throws WSSecurityException {
    logger.debug("IN: userId = " + userId);
    try {
      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      SpagoBIUserProfile profile = supplier.checkAuthentication(userId, password);
      if (profile == null) {
        logger.error("Authentication failed for user " + userId);
        throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
      }
    } catch (WSSecurityException e) {
View Full Code Here


     

    }
   
   
    ISecurityServiceSupplier supplier=SecurityServiceSupplierFactory.createISecurityServiceSupplier();
    // If SSO is not active, check username and password, i.e. performs the authentication;
    // instead, if SSO is active, the authentication mechanism is provided by the SSO itself, so SpagoBI does not make
    // any authentication, just creates the user profile object and puts it into Spago permanent container
    if (!activeSoo) {
      String pwd=(String)request.getAttribute("password");      
      try {
        Object ris=supplier.checkAuthentication(userId, pwd);
        if (ris==null){
          logger.error("pwd uncorrect");
          EMFUserError emfu = new EMFUserError(EMFErrorSeverity.ERROR, 501);
          errorHandler.addError(emfu);          
          return;
View Full Code Here

           
      // If SSO is not active, check username and password, i.e. performs the authentication;
      // instead, if SSO is active, the authentication mechanism is provided by the SSO itself, so SpagoBI does not make
      // any authentication, just creates the user profile object and puts it into Spago permanent container
      if(!isSSOActive) {
        ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
               
        Assert.assertNotNull(usr, "User identifier not spicified");       
        Assert.assertNotNull(usr, "Password not spicified");
       
        if( supplier.checkAuthentication(usr, pwd) == null) {
          logger.warn("An attempt to authenticate with wrong credential has made [" + usr + "/" + pwd +"]");
          throw new SpagoBIServiceException(SERVICE_NAME, "An attempt to authenticate with wrong credential has made [" + usr + "/" + pwd +"]");
        }
       
      } else {
View Full Code Here

   */
  public static IEngUserProfile createNewUserProfile(String userId) throws Exception {
    logger.debug("IN");
    IEngUserProfile profile = null;
    try {
      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      SpagoBIUserProfile user = supplier.createUserProfile(userId);
      user.setFunctions(UserUtilities.readFunctionality(user.getRoles()));
      profile = new UserProfile(user);
    } catch (Exception e) {
      logger.error("An error occurred while creating user profile for user [" + userId + "]");
      throw new SecurityException("An error occurred while creating user profile for user [" + userId + "]", e);
View Full Code Here

      PortletRequest portletRequest = PortletUtilities.getPortletRequest();
      Principal principal = portletRequest.getUserPrincipal();
      userId = principal.getName();
      logger.debug("got userId from Principal=" + userId);

      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      SpagoBIUserProfile user = null;
      try {
    user = supplier.createUserProfile(userId);
   
    user.setFunctions(readFunctionality(user.getRoles()));
    userProfile = new UserProfile(user);
      } catch (Exception e) {
        logger.error("An error occured while retrieving user profile for user[" + userId +"]");
View Full Code Here

    public static IEngUserProfile getUserProfile(HttpServletRequest req) throws Exception {
      logger.debug("IN");
      SsoServiceInterface userProxy = SsoServiceFactory.createProxyService();
    String userId = userProxy.readUserIdentifier(req);
   
      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      try {
    SpagoBIUserProfile user = supplier.createUserProfile(userId);
    user.setFunctions(readFunctionality(user.getRoles()));
    return new UserProfile(user);
      } catch (Exception e) {
        logger.error("Exception while creating user profile",e);
      throw new SecurityException("Exception while creating user profile", e);
View Full Code Here

      }
    }
    public static IEngUserProfile getUserProfile(String userId) throws Exception {
      logger.debug("IN.userId="+userId);
      if (userId==null) return null;
      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      try {
    SpagoBIUserProfile user = supplier.createUserProfile(userId);
    if (user==null) return null;
    user.setFunctions(readFunctionality(user.getRoles()));
    return new UserProfile(user);
      } catch (Exception e) {
        logger.error("Exception while creating user profile",e);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.services.security.service.ISecurityServiceSupplier

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.