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());
}
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());
}
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());
}
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;
}
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;
}
Aggregations