Search in sources :

Example 1 with ReAuthRequest

use of net.java.slee.resource.diameter.base.events.ReAuthRequest in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method isRequestRAR.

@Test
public void isRequestRAR() throws Exception {
    ReAuthRequest rar = messageFactory.createReAuthRequest();
    assertTrue("Request Flag in Re-Auth-Request is not set.", rar.getHeader().isRequest());
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest) Test(org.junit.Test)

Example 2 with ReAuthRequest

use of net.java.slee.resource.diameter.base.events.ReAuthRequest in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method isProxiableCopiedRAA.

@Test
public void isProxiableCopiedRAA() throws Exception {
    ReAuthRequest asr = messageFactory.createReAuthRequest();
    ReAuthAnswer asa = messageFactory.createReAuthAnswer(asr);
    assertEquals("The 'P' bit is not copied from request in Re-Auth-Answer, it should. [RFC3588/6.2]", asr.getHeader().isProxiable(), asa.getHeader().isProxiable());
    // Reverse 'P' bit ...
    ((DiameterMessageImpl) asr).getGenericData().setProxiable(!asr.getHeader().isProxiable());
    assertTrue("The 'P' bit was not modified in Re-Auth-Request, it should.", asr.getHeader().isProxiable() != asa.getHeader().isProxiable());
    asa = messageFactory.createReAuthAnswer(asr);
    assertEquals("The 'P' bit is not copied from request in Re-Auth-Answer, it should. [RFC3588/6.2]", asr.getHeader().isProxiable(), asa.getHeader().isProxiable());
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest) ReAuthAnswer(net.java.slee.resource.diameter.base.events.ReAuthAnswer) Test(org.junit.Test)

Example 3 with ReAuthRequest

use of net.java.slee.resource.diameter.base.events.ReAuthRequest in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method isProxiableRAR.

@Test
public void isProxiableRAR() throws Exception {
    ReAuthRequest acr = messageFactory.createReAuthRequest();
    assertTrue("The 'P' bit is not set by default in Re-Auth-Request, it should.", acr.getHeader().isProxiable());
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest) Test(org.junit.Test)

Example 4 with ReAuthRequest

use of net.java.slee.resource.diameter.base.events.ReAuthRequest in project jain-slee.diameter by RestComm.

the class DiameterMessageFactoryImpl method createReAuthRequest.

public ReAuthRequest createReAuthRequest(DiameterAvp[] avps) throws AvpNotAllowedException {
    ReAuthRequest msg = (ReAuthRequest) this.createDiameterMessage(null, avps, Message.RE_AUTH_REQUEST, BASE_AUTH_APP_ID);
    // Add Session-Id AVP if not present
    addSessionIdAvp(msg);
    return msg;
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest)

Example 5 with ReAuthRequest

use of net.java.slee.resource.diameter.base.events.ReAuthRequest in project jain-slee.diameter by RestComm.

the class AuthServerSessionActivityImpl method createReAuthRequest.

public ReAuthRequest createReAuthRequest(ReAuthRequestType reAuthRequestType) {
    ReAuthRequest rar = messageFactory.createReAuthRequest();
    // Set Auth-Application-Id to 0 as specified
    rar.setAuthApplicationId(0L);
    rar.setReAuthRequestType(reAuthRequestType);
    return rar;
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest)

Aggregations

ReAuthRequest (net.java.slee.resource.diameter.base.events.ReAuthRequest)8 Test (org.junit.Test)5 ReAuthAnswer (net.java.slee.resource.diameter.base.events.ReAuthAnswer)2