[ 
https://issues.apache.org/jira/browse/CXF-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Wulff updated CXF-4543:
------------------------------

    Comment: was deleted

(was: Maybe something like this is better as it enforces that all list elements 
are of the same type as required by saml spec.

public class Claim<T> implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -1151700035195497499L;
    private URI claimType;
    private String issuer;
    private String originalIssuer;
    private transient Principal principal;
    private List<T> values = new ArrayList<T>(1);

    public String getIssuer() {
        return issuer;
    }

    public void setIssuer(String issuer) {
        this.issuer = issuer;
    }

    public String getOriginalIssuer() {
        return originalIssuer;
    }

    public void setOriginalIssuer(String originalIssuer) {
        this.originalIssuer = originalIssuer;
    }

    public URI getClaimType() {
        return claimType;
    }

    public void setClaimType(URI claimType) {
        this.claimType = claimType;
    }

    public Principal getPrincipal() {
        return principal;
    }

    public void setPrincipal(Principal principal) {
        this.principal = principal;
    }

    public void setValues(List<T> values) {
        this.values.clear();
        this.values.addAll(values);
    }

    public void addValue(T s) {
        this.values.add(s);
    }
    
    public List<T> getValues() {
        return values;
    }
})
    
> Encode multi value claims as multi-value saml attribute
> -------------------------------------------------------
>
>                 Key: CXF-4543
>                 URL: https://issues.apache.org/jira/browse/CXF-4543
>             Project: CXF
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 2.7.0
>            Reporter: Oliver Wulff
>
> The current ClaimsAttributeStatementProvider supports encoding for string 
> type value of claims. It's up to the ClaimsHandler to implement multi-value 
> claim support and encoding.
> As mentioned here:
> http://cxf.547215.n5.nabble.com/SAML-2-0-attibutes-and-claims-naming-convention-td5712967.html
> The type of the value in the class Claim has to be changed from String to 
> Object. The ClaimsAttributeStatementProvider can then be configured how to 
> encode multi value claims. Fediz already supports both since FEDIZ-22.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to