Package org.apache.rahas.impl.util

Examples of org.apache.rahas.impl.util.SAMLCallbackHandler.handle()


                    handler = (SAMLCallbackHandler) cbClass.newInstance();
                } catch (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",
View Full Code Here


    // Call the attribute callback handlers to get any attributes if exists
    if (config.getCallbackHander() != null) {
      SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
      SAMLCallbackHandler handler = config.getCallbackHander();
      handler.handle(cb);
      attributes = cb.getSAML2Attributes();
    } else if (config.getCallbackHandlerName() != null
        && config.getCallbackHandlerName().trim().length() > 0) {
      SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
      SAMLCallbackHandler handler = null;
View Full Code Here

        handler = (SAMLCallbackHandler) cbClass.newInstance();
      } catch (java.lang.Exception e) {
        throw new TrustException("cannotCreatePWCBInstance", new String[]{config
            .getCallbackHandlerName()}, e);
      }
      handler.handle(cb);
      attributes = cb.getSAML2Attributes();
      // else add the attribute with a default value
    } else {
      SAMLObjectBuilder<Attribute> attrBuilder = (SAMLObjectBuilder<Attribute>) builderFactory
          .getBuilder(Attribute.DEFAULT_ELEMENT_NAME);
View Full Code Here

              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

          
            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;
View Full Code Here

          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

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

          
            SAMLAttribute[] attrs = null;
            if(config.getCallbackHandler() != null){
              SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
              SAMLCallbackHandler handler = config.getCallbackHandler();
              handler.handle(cb);
              attrs = cb.getAttributes();
            } else if (config.getCallbackHandlerName() != null
          && config.getCallbackHandlerName().trim().length() > 0) {
        SAMLAttributeCallback cb = new SAMLAttributeCallback(data);
        SAMLCallbackHandler handler = null;
View Full Code Here

          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

        try {
            SAMLAttribute[] attrs = null;
            if (config.getCallbackHandler() != null) {
                SAMLAttributeCallback cb = new SAMLAttributeCallback(rahasData);
                SAMLCallbackHandler handler = config.getCallbackHandler();
                handler.handle(cb);
                attrs = cb.getAttributes();
            } else if (config.getCallbackHandlerName() != null
                       && config.getCallbackHandlerName().trim().length() > 0) {
                SAMLAttributeCallback cb = new SAMLAttributeCallback(rahasData);
                SAMLCallbackHandler handler = null;
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.