Package com.github.ebnew.ki4so.core.exception

Examples of com.github.ebnew.ki4so.core.exception.UnsupportedCredentialsException


        }
      }
    }
    //未找到支持的认证处理器。
    if(!foundSupported){
      throw new UnsupportedCredentialsException();
    }
   
    //若未认证通过,则抛出最后一个异常信息。
    if(!authenticated){
      throw unAuthSupportedHandlerException;
    }
   
    Principal principal = null;
    //初始化是否找到合适的凭据转换器。
    foundSupported = false;
    //循环调用所有的用户凭据解析器。
    if(credentialToPrincipalResolvers!=null && credentialToPrincipalResolvers.size()>0){
      for(CredentialToPrincipalResolver resolver:credentialToPrincipalResolvers){
        //用户凭据解析器是否支持该凭据。
        if(resolver.supports(credential)){
          foundSupported = true;
          principal = resolver.resolvePrincipal(credential);
          //若解析成功,则跳出循环。
          if(principal!=null){
            break;
          }
        }
      }
    }
    //未找到支持的用户凭据解析器。
    if(!foundSupported){
      throw new UnsupportedCredentialsException();
    }
    //若认证后处理器对象为空,则抛出异常。
    if(authenticationPostHandler==null){
      throw new NoAuthenticationPostHandlerException();
    }
View Full Code Here

TOP

Related Classes of com.github.ebnew.ki4so.core.exception.UnsupportedCredentialsException

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.