use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationAnswer in project jain-slee.diameter by RestComm.
the class S6aServerSessionImpl method createAuthenticationInformationAnswer.
public AuthenticationInformationAnswer createAuthenticationInformationAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof AuthenticationInformationRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
AuthenticationInformationAnswer aia = (AuthenticationInformationAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, AuthenticationInformationAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(aia);
return aia;
} catch (InternalException e) {
logger.error("Failed to create Authentication-Information-Answer.", e);
}
return null;
}
use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationAnswer in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method hasTFlagSetAIA.
@Test
public void hasTFlagSetAIA() throws Exception {
AuthenticationInformationRequest air = s6aMessageFactory.createAuthenticationInformationRequest();
((DiameterMessageImpl) air).getGenericData().setReTransmitted(true);
assertTrue("The 'T' flag should be set in Authentication-Information-Request", air.getHeader().isPotentiallyRetransmitted());
serverSession.fetchSessionData(air);
AuthenticationInformationAnswer aia = serverSession.createAuthenticationInformationAnswer();
assertFalse("The 'T' flag should not be set in Authentication-Information-Answer", aia.getHeader().isPotentiallyRetransmitted());
}
use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationAnswer in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method testGettersAndSettersAIA.
@Test
public void testGettersAndSettersAIA() throws Exception {
AuthenticationInformationRequest air = s6aMessageFactory.createAuthenticationInformationRequest();
serverSession.fetchSessionData(air);
AuthenticationInformationAnswer aia = serverSession.createAuthenticationInformationAnswer();
int nFailures = S6aAvpAssistant.INSTANCE.testMethods(aia, AuthenticationInformationAnswer.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Aggregations