You are correct.

> -----Original Message-----
> From: Guillaume Rousse [mailto:[email protected]]
> Sent: Wednesday, March 26, 2014 2:59 AM
> To: [email protected]
> Subject: [cas-user] Troubles understanding allowed syntax for ticket
> expiration policies
>
> Hello list.
>
> I've a bit of trouble understanding what is the allowed syntax for the
> various available ticket expiration policies, with cas server 3.5.2.
>
>
> I understand than the original syntax is the one used in the first
> example on documentation
> (https://wiki.jasig.org/display/casum/ticket+expiration+policy), meaning
> passing all parameters with an explicit index to the constructor, with
> time expressed in milliseconds:
> <bean id="policyId" class="policyClass">
>    <constructor-arg index="0" value="7200000" />
> </bean>
>
> Now, it seems recent spring versions provided additional syntactic
> sugar, based on argument pre-processing, such as:
> <bean id="policyId" class="policyClass" p:something="10800000"/>
> or
> <bean id="policyId" class="policyClass" c:something="10800000"/>
>
> I understand than 'p' prefix refers to passing argument through class
> setters ('p' for property) whereas 'c' prefix refers to passing argument
> to the constructor ('c' for constructor). I can eventuall refers to the
> API  documentation to understand than only some of the classes accept
> the first kind of syntax:
> HardTimeoutExpirationPolicy doesn't have any setter
> ThrottledUseAndTimeoutExpirationPolicy does
>
> However, I don't understand which classes may accept time values
> expressed with another value as milliseconds, using constants defined in
> util schema:
>
> <bean
>    id="serviceTicketExpirationPolicy"
>
class="org.jasig.cas.ticket.support.MultiTimeUseOrTimeoutExpirationPolicy"
>    c:numberOfUses="1"
>    c:timeToKill="${st.timeToKillInSeconds:10}"
>    c:timeUnit-ref="SECONDS"
> />
> This works
>
> <bean
>    id="grantingTicketExpirationPolicy"
>    class="org.jasig.cas.ticket.support.HardTimeoutExpirationPolicy"
>    c:timeToKill="${tgt.timeToKillInSeconds:7200}"
>    c:timeUnit-ref="SECONDS"
> />
> This doesn't work.
>
> I've seen the long thread on the subject here:
>
http://jasig.275507.n4.nabble.com/ExpirationPolicy-Time-Unit-Consistency-
> td4469136.html
> But there is no clear conclusion.
>
> I also read this ticket:
> https://issues.jasig.org/browse/CAS-1104
> Which seems to imply than basically, only the default policies (meaning
> TicketGrantingTicketExpirationPolicy and
> MultiTimeUseOrTimeoutExpirationPolicy only) support arbitrary time
> units, all other requiring milliseconds, whatever the exact syntax used.
>
> Am I correct ?
> --
> Guillaume Rousse
> INRIA, Direction des syst?mes d'information
> Domaine de Voluceau
> Rocquencourt - BP 105
> 78153 Le Chesnay
> Tel: 01 39 63 58 31


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to