Examples of SamlCallbackHandler


Examples of org.apache.rahas.impl.util.SAMLCallbackHandler

            if (principal instanceof WSUsernameTokenPrincipal) {
              SAMLNameIdentifier nameId = null;
              if(config.getCallbackHander() != null){
                SAMLNameIdentifierCallback cb = new SAMLNameIdentifierCallback(data);
                cb.setUserId(principal.getName());
                SAMLCallbackHandler callbackHandler = config.getCallbackHander();
                callbackHandler.handle(cb);
                nameId = cb.getNameId();
              }else{
                  nameId = new SAMLNameIdentifier(
                principal.getName(), null, SAMLNameIdentifier.FORMAT_EMAIL);
              }
View Full Code Here

Examples of org.apache.rahas.impl.util.SAMLCallbackHandler

          
            SAMLAttribute[] attrs = null;
            if(config.getCallbackHander() != null){
              SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
              SAMLCallbackHandler handler = config.getCallbackHander();
              handler.handle(cb);
              attrs = cb.getAttributes();
            } else if (config.getCallbackHandlerName() != null
          && config.getCallbackHandlerName().trim().length() > 0) {
        SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
        SAMLCallbackHandler handler = null;
        MessageContext msgContext = data.getInMessageContext();
        ClassLoader classLoader = msgContext.getAxisService().getClassLoader();
        Class cbClass = null;
        try {
          cbClass = Loader.loadClass(classLoader, config.getCallbackHandlerName());
        } catch (ClassNotFoundException e) {
          throw new TrustException("cannotLoadPWCBClass", new String[]{config
              .getCallbackHandlerName()}, e);
        }
        try {
          handler = (SAMLCallbackHandler) cbClass.newInstance();
        } catch (java.lang.Exception e) {
          throw new TrustException("cannotCreatePWCBInstance", new String[]{config
              .getCallbackHandlerName()}, e);
        }
        handler.handle(cb);
        attrs = cb.getAttributes();
            }else{
              //TODO Remove this after discussing
                SAMLAttribute attribute = new SAMLAttribute("Name",
                        "https://rahas.apache.org/saml/attrns", null, -1, Arrays
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.