Package org.apache.ws.secpolicy.model

Examples of org.apache.ws.secpolicy.model.UsernameToken


public class UsernameTokenBuilder implements AssertionBuilder {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken(SPConstants.SP_V11);
       
        OMAttribute attribute = element.getAttribute(SP11Constants.INCLUDE_TOKEN);
       
        if(attribute != null) {
            int inclusion = SP11Constants.getInclusionFromAttributeValue(attribute.getAttributeValue());
            usernameToken.setInclusion(inclusion);
        }
       
        OMElement policyElement = element.getFirstElement();
       
        if (policyElement != null && !policyElement.getQName().equals(org.apache.neethi.Constants.Q_ELEM_POLICY)) {
View Full Code Here


public class UsernameTokenBuilder implements AssertionBuilder {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken();
       
        OMAttribute attribute = element.getAttribute(Constants.INCLUDE_TOKEN);
        String inclusionValue = attribute.getAttributeValue();
       
        if (inclusionValue.endsWith(Constants.INCLUDE_NEVER)) {
            usernameToken.setInclusion(Constants.INCLUDE_NEVER);
           
        } else if (inclusionValue.endsWith(Constants.INCLUDE_ONCE)) {
            usernameToken.setInclusion(Constants.INCLUDE_ONCE);
           
        } else if (inclusionValue.endsWith(Constants.INCLUDE_ALWAYS_TO_RECIPIENT)) {
            usernameToken.setInclusion(Constants.INCLUDE_ALWAYS_TO_RECIPIENT);
           
        } else if (inclusionValue.endsWith(Constants.INCLUDE_ALWAYS)) {
            usernameToken.setInclusion(Constants.INCLUDE_ALWAYS);
        }
       
       
        OMElement policyElement = element.getFirstElement();
       
View Full Code Here

public class UsernameTokenBuilder implements AssertionBuilder<OMElement> {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken(SPConstants.SP_V12);
       
        OMAttribute attribute = element.getAttribute(SP12Constants.INCLUDE_TOKEN);
       
        if(attribute != null) {
            int inclusion = SP12Constants.getInclusionFromAttributeValue(attribute.getAttributeValue());
            usernameToken.setInclusion(inclusion);
        }
       
        OMAttribute isOptional = element.getAttribute(Constants.Q_ELEM_OPTIONAL_ATTR);
    if (isOptional != null) {
      usernameToken.setOptional(Boolean.valueOf(isOptional.getAttributeValue())
          .booleanValue());
    }
       
        OMElement policyElement = element.getFirstElement();
       
View Full Code Here

public class UsernameTokenBuilder implements AssertionBuilder<OMElement> {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken(SPConstants.SP_V11);
       
        OMAttribute attribute = element.getAttribute(SP11Constants.INCLUDE_TOKEN);
       
        if(attribute != null) {
            int inclusion = SP11Constants.getInclusionFromAttributeValue(attribute.getAttributeValue());
            usernameToken.setInclusion(inclusion);
        }
       
        OMAttribute isOptional = element.getAttribute(Constants.Q_ELEM_OPTIONAL_ATTR);
    if (isOptional != null) {
      usernameToken.setOptional(Boolean.valueOf(isOptional.getAttributeValue())
          .booleanValue());
    }
       
        OMElement policyElement = element.getFirstElement();
       
View Full Code Here

public class UsernameTokenBuilder implements AssertionBuilder {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken(SPConstants.SP_V12);
       
        OMAttribute attribute = element.getAttribute(SP12Constants.INCLUDE_TOKEN);
       
        if(attribute != null) {
            int inclusion = SP12Constants.getInclusionFromAttributeValue(attribute.getAttributeValue());
            usernameToken.setInclusion(inclusion);
        }
       
        OMAttribute isOptional = element.getAttribute(Constants.Q_ELEM_OPTIONAL_ATTR);
    if (isOptional != null) {
      usernameToken.setOptional(Boolean.valueOf(isOptional.getAttributeValue())
          .booleanValue());
    }
       
        OMElement policyElement = element.getFirstElement();
       
View Full Code Here

public class UsernameTokenBuilder implements AssertionBuilder {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken(SPConstants.SP_V11);
       
        OMAttribute attribute = element.getAttribute(SP11Constants.INCLUDE_TOKEN);
       
        if(attribute != null) {
            int inclusion = SP11Constants.getInclusionFromAttributeValue(attribute.getAttributeValue());
            usernameToken.setInclusion(inclusion);
        }
       
        OMAttribute isOptional = element.getAttribute(Constants.Q_ELEM_OPTIONAL_ATTR);
    if (isOptional != null) {
      usernameToken.setOptional(Boolean.valueOf(isOptional.getAttributeValue())
          .booleanValue());
    }
       
        OMElement policyElement = element.getFirstElement();
       
View Full Code Here

public class UsernameTokenBuilder implements AssertionBuilder {

   
    public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
        UsernameToken usernameToken = new UsernameToken();
       
        OMAttribute attribute = element.getAttribute(Constants.INCLUDE_TOKEN);
        if(attribute != null) {
            usernameToken.setInclusion(attribute.getAttributeValue());
        }
       
        OMElement policyElement = element.getFirstElement();
       
        if (policyElement != null && !policyElement.getQName().equals(org.apache.neethi.Constants.Q_ELEM_POLICY)) {
View Full Code Here

TOP

Related Classes of org.apache.ws.secpolicy.model.UsernameToken

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.