Package org.apache.rahas.impl.util

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


            Principal principal = data.getPrincipal();
            // In the case where the principal is a UT
            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


            Principal principal = data.getPrincipal();
            // In the case where the principal is a UT
            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

            SAMLAssertion assertion;
            // In the case where the principal is a UT
            if (principal instanceof WSUsernameTokenPrincipal) {
              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);
              }
              assertion = createAuthAssertion(doc, SAMLSubject.CONF_BEARER,
View Full Code Here

            Principal principal = data.getPrincipal();
            // In the case where the principal is a UT
            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

            SAMLAssertion assertion;
            // In the case where the principal is a UT
            if (principal instanceof WSUsernameTokenPrincipal) {
              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);
              }
              assertion = createAuthAssertion(doc, SAMLSubject.CONF_BEARER,
View Full Code Here

            Principal principal = data.getPrincipal();
            // In the case where the principal is a UT
            if (principal instanceof WSUsernameTokenPrincipal) {
              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 attribute = new SAMLAttribute("Name",
                     "https://rahas.apache.org/saml/attrns", null, -1, Arrays
                             .asList(new String[] { "Custom/Rahas" }));
      cb.addAttributes(attribute);
    }else if(callback.getCallbackType() == SAMLCallback.NAME_IDENTIFIER_CALLBACK){
      SAMLNameIdentifierCallback cb = (SAMLNameIdentifierCallback)callback;
      SAMLNameIdentifier nameId = new SAMLNameIdentifier(
                "David", null, SAMLNameIdentifier.FORMAT_EMAIL);
      cb.setNameId(nameId);
    }
   
  }
View Full Code Here

TOP

Related Classes of org.apache.rahas.impl.util.SAMLNameIdentifierCallback

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.