Changeset 1210


Ignore:
Timestamp:
12/05/11 18:57:17 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-information-model/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/AuthenticationEvent.java

    r942 r1210  
    2929    private String authenticationType; 
    3030     
     31    /** The name of the identity that participated in this event. For example username. */ 
    3132    private String principalName; 
    3233 
     
    6263    } 
    6364 
    64     public void setPrincipalName(String principalName) { 
    65         this.principalName = principalName; 
     65    public void setPrincipalName(String principal) { 
     66        this.principalName = principal; 
    6667    } 
    6768 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/Event.java

    r1204 r1210  
    6060    private String resourceHost; 
    6161 
    62     /** The resource id. This is the resource you are using. */ 
     62    /** The resource id. This is the identifier of resource you are using. */ 
    6363    private String resourceId; 
    6464 
     
    138138     * Only XML DATE or XML DATETIME objects can be sent through XML WS hence, the joda.DateTime property is ignored, instead a proxy getDate method is used to 
    139139     * convert from DateTime to Date 
    140      * <p> 
    141140     *  
    142141     * @return a Date representation of the eventTime DateTime format 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/ShibbolethIdpAuthenticationEvent.java

    r1172 r1210  
    3535    private String nameIdentifier; 
    3636 
    37     /** The assertion id. */ 
    38     private String[] assertionId; 
     37    /** The assertion ids for the released attributes. */ 
     38    private String[] assertions; 
    3939 
    4040    /** The released attributes. */ 
    41     private String[] releasedAttributes; 
     41    private String[] attributes; 
    4242 
    4343    /** 
     
    7373 
    7474        // shallow copy is OK here, as a new array is created with immutable objects (String). 
    75         this.assertionId = event.getAssertionId().clone(); 
    76         this.releasedAttributes = event.getReleasedAttributes().clone(); 
     75        this.assertions = event.getAssertions().clone(); 
     76        this.attributes = event.getAttributes().clone(); 
    7777    } 
    7878 
     
    149149     *            the releasedAttributes to set 
    150150     */ 
    151     public void setReleasedAttributes(String[] releasedAttributes) { 
    152         this.releasedAttributes = releasedAttributes; 
     151    public void setAttributes(String[] releasedAttributes) { 
     152        this.attributes = releasedAttributes; 
    153153    } 
    154154 
     
    158158     * @return the releasedAttributes 
    159159     */ 
    160     public String[] getReleasedAttributes() { 
    161         return releasedAttributes; 
     160    public String[] getAttributes() { 
     161        return attributes; 
    162162    } 
    163163 
     
    190190                && EqualsUtil.areEqual(this.getNameIdentifier(), that.getNameIdentifier()) && EqualsUtil.areEqual(this.getResponseId(), that.getResponseId()) 
    191191                && EqualsUtil.areEqual(this.getServiceId(), that.getServiceId()) && EqualsUtil.areEqual(this.getEventType(), that.getEventType()) 
    192                 && EqualsUtil.areEqual(this.getResourceId(), that.getResourceId()) && Arrays.equals(this.getAssertionId(), that.getAssertionId()) 
    193                 && Arrays.equals(this.getReleasedAttributes(), that.getReleasedAttributes()); 
     192                && EqualsUtil.areEqual(this.getResourceId(), that.getResourceId()) && Arrays.equals(this.getAssertions(), that.getAssertions()) 
     193                && Arrays.equals(this.getAttributes(), that.getAttributes()); 
    194194 
    195195        return areEqual; 
     
    231231        hash = HashCodeUtil.hash(hash, getResponseBinding()); 
    232232        hash = HashCodeUtil.hash(hash, getResourceHost()); 
    233         hash = HashCodeUtil.hash(hash, getReleasedAttributes()); 
     233        hash = HashCodeUtil.hash(hash, getAttributes()); 
    234234        hash = HashCodeUtil.hash(hash, getMessageProfileId()); 
    235235        hash = HashCodeUtil.hash(hash, getRequestBinding()); 
     
    237237        hash = HashCodeUtil.hash(hash, getNameIdentifier()); 
    238238        hash = HashCodeUtil.hash(hash, getResponseId()); 
    239         hash = HashCodeUtil.hash(hash, getAssertionId()); 
     239        hash = HashCodeUtil.hash(hash, getAssertions()); 
    240240        hash = HashCodeUtil.hash(hash, getEventType()); 
    241241        hash = HashCodeUtil.hash(hash, getServiceId()); 
     
    270270     *            the new assertion id 
    271271     */ 
    272     public void setAssertionId(String[] assertionId) { 
    273         this.assertionId = assertionId; 
     272    public void setAssertions(String[] assertionId) { 
     273        this.assertions = assertionId; 
    274274    } 
    275275 
     
    279279     * @return the assertion id 
    280280     */ 
    281     public String[] getAssertionId() { 
    282         return assertionId; 
     281    public String[] getAssertions() { 
     282        return assertions; 
    283283    } 
    284284 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/event.hbm.xml

    r1204 r1210  
    8989                        type="string" /> 
    9090                <property name="requestBinding" column="requestBinding" type="string" /> 
    91                 <property name="releasedAttributes" column="releasedAttributes" 
     91                <property name="attributes" column="releasedattributes" 
    9292                        type="uk.ac.cardiff.model.hibernate.types.CommaDelimStringToListUserType" length="400"/> 
    93                 <property name="assertionId" column="assertionId" 
     93                <property name="assertions" column="assertionid" 
    9494                        type="uk.ac.cardiff.model.hibernate.types.CommaDelimStringToListUserType" /> 
    9595                <property name="nameIdentifier" column="nameIdentifier" type="string" /> 
  • raptor-information-model/trunk/src/test/java/uk/ac/cardiff/model/event/ShibbolethEntryTest.java

    r1204 r1210  
    2929        entry.setPrincipalName("scmps2"); 
    3030        entry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    31         entry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     31        entry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    3232        entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    3333        entry.setRequestId(""); 
     
    4444        equalEntry.setPrincipalName("scmps2"); 
    4545        equalEntry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    46         equalEntry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     46        equalEntry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    4747        equalEntry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    4848        equalEntry.setRequestId(""); 
     
    7070        entry.setPrincipalName("scmps2"); 
    7171        entry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    72         entry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     72        entry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    7373        entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    7474        entry.setRequestId(""); 
     
    8585        equalEntry.setPrincipalName("scmps2"); 
    8686        equalEntry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    87         equalEntry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     87        equalEntry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    8888        equalEntry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    8989        equalEntry.setRequestId(""); 
     
    111111        entry.setPrincipalName("scmps2"); 
    112112        entry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    113         entry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     113        entry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    114114        entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    115115        entry.setRequestId(""); 
     
    126126        equalEntry.setPrincipalName("scmps2"); 
    127127        equalEntry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    128         equalEntry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation" }); // removed eduPersonEntitlement 
     128        equalEntry.setAttributes(new String[] { "eduPersonScopedAffiliation" }); // removed eduPersonEntitlement 
    129129        equalEntry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    130130        equalEntry.setRequestId(""); 
     
    150150        entry.setPrincipalName("scmps2"); 
    151151        entry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    152         entry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    153         entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    154         entry.setRequestId(""); 
    155         entry.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); 
    156         entry.setResourceHost("https://idp.cardiff.ac.uk/shibboleth"); 
    157         entry.setAssertionId(new String[] { "1" }); 
     152        entry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     153        entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
     154        entry.setRequestId(""); 
     155        entry.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); 
     156        entry.setResourceHost("https://idp.cardiff.ac.uk/shibboleth"); 
     157        entry.setAssertions(new String[] { "1" }); 
    158158        entry.setEventId(100); 
    159159        entry.setNameIdentifier("name1"); 
     
    177177        copy.setPrincipalName("new"); 
    178178        copy.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest-new"); 
    179         copy.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation" }); // removed eduPersonEntitlement 
     179        copy.setAttributes(new String[] { "eduPersonScopedAffiliation" }); // removed eduPersonEntitlement 
    180180        copy.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth-new"); 
    181181        copy.setRequestId("new"); 
    182182        copy.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-SOAP-new"); 
    183183        copy.setResourceHost("https://idp.cardiff.ac.uk/shibboleth-new"); 
    184         copy.setAssertionId(new String[] { "1", "4" }); 
     184        copy.setAssertions(new String[] { "1", "4" }); 
    185185        copy.setEventId(300); 
    186186        copy.setNameIdentifier("new"); 
     
    213213        entry.setPrincipalName("scmps2"); 
    214214        entry.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    215         entry.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
    216         entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    217         entry.setRequestId(""); 
    218         entry.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); 
    219         entry.setResourceHost("https://idp.cardiff.ac.uk/shibboleth"); 
    220         entry.setAssertionId(new String[] { "1" }); 
     215        entry.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); 
     216        entry.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
     217        entry.setRequestId(""); 
     218        entry.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); 
     219        entry.setResourceHost("https://idp.cardiff.ac.uk/shibboleth"); 
     220        entry.setAssertions(new String[] { "1" }); 
    221221        entry.setEventId(100); 
    222222        entry.setNameIdentifier("name1"); 
     
    236236        copy.setPrincipalName("scmps2"); 
    237237        copy.setRequestBinding("urn:mace:shibboleth:1.0:profiles:AuthnRequest"); 
    238         copy.setReleasedAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); // removed eduPersonEntitlement 
     238        copy.setAttributes(new String[] { "eduPersonScopedAffiliation", "eduPersonEntitlement" }); // removed eduPersonEntitlement 
    239239        copy.setServiceHost("https://abc.cardiff.ac.uk/sp/shibboleth"); 
    240240        copy.setRequestId(""); 
    241241        copy.setResponseBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); 
    242242        copy.setResourceHost("https://idp.cardiff.ac.uk/shibboleth"); 
    243         entry.setAssertionId(new String[] { "1" }); 
     243        entry.setAssertions(new String[] { "1" }); 
    244244        entry.setEventId(100); 
    245245        entry.setNameIdentifier("name1"); 
Note: See TracChangeset for help on using the changeset viewer.