Search in sources :

Example 6 with AuthenticationInformationRequest

use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method isRequestAIR.

@Test
public void isRequestAIR() throws Exception {
    AuthenticationInformationRequest air = s6aMessageFactory.createAuthenticationInformationRequest();
    assertTrue("Request Flag in Authentication-Information-Request is not set.", air.getHeader().isRequest());
}
Also used : AuthenticationInformationRequest(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with AuthenticationInformationRequest

use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method isProxiableAIR.

@Test
public void isProxiableAIR() throws Exception {
    AuthenticationInformationRequest air = s6aMessageFactory.createAuthenticationInformationRequest();
    assertTrue("The 'P' bit is not set by default in Authentication-Information-Request it should.", air.getHeader().isProxiable());
}
Also used : AuthenticationInformationRequest(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 8 with AuthenticationInformationRequest

use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method testGettersAndSettersAIR.

@Test
public void testGettersAndSettersAIR() throws Exception {
    AuthenticationInformationRequest air = s6aMessageFactory.createAuthenticationInformationRequest();
    int nFailures = S6aAvpAssistant.INSTANCE.testMethods(air, AuthenticationInformationRequest.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : AuthenticationInformationRequest(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 9 with AuthenticationInformationRequest

use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest in project jain-slee.diameter by RestComm.

the class S6aMessageFactoryImpl method createAuthenticationInformationRequest.

public AuthenticationInformationRequest createAuthenticationInformationRequest(String sessionId) throws IllegalArgumentException {
    AuthenticationInformationRequest uar = createAuthenticationInformationRequest();
    uar.setSessionId(sessionId);
    return uar;
}
Also used : AuthenticationInformationRequest(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest)

Example 10 with AuthenticationInformationRequest

use of net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest 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;
}
Also used : AuthenticationInformationAnswer(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationAnswer) DiameterAvp(net.java.slee.resource.diameter.base.events.avp.DiameterAvp) AuthenticationInformationRequest(net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest) InternalException(org.jdiameter.api.InternalException)

Aggregations

AuthenticationInformationRequest (net.java.slee.resource.diameter.s6a.events.AuthenticationInformationRequest)13 Test (org.junit.Test)11 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)11 AuthenticationInformationAnswer (net.java.slee.resource.diameter.s6a.events.AuthenticationInformationAnswer)8 ApplicationId (org.jdiameter.api.ApplicationId)2 S6aMessageFactoryImpl (org.mobicents.slee.resource.diameter.s6a.S6aMessageFactoryImpl)2 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)1 InternalException (org.jdiameter.api.InternalException)1