Skip to content

PED Login Process in Inflight Passenger System(IPS)#

1. Description of PED Login#

PED (Personal Electronic Device) Login allows passengers to use their personal devices to log into the Inflight Passenger System (IPS). This feature provides access to personalized content and services based on user-specific authentication fields. These authentication fields are defined in a JSON object within the service_config block, which is part of the customer PMD (Passenger Manifest Data). The service_config JSON block specifies the fields required for authentication, catering to airline-specific needs without needing airline-specific IPS software versions.

Design Update:

  • Service Configuration: A service_config JSON object is added to the PMD to define authentication fields for login.

  • Authentication Fields: These fields are configurable based on seat classes or the entire aircraft, allowing flexibility in user authentication.

Example service_config Structure:

{
  "service_config": {
    "auth_fields_all": [
      "frequent_flyer.frequent_flyer_number_last_4_digits | travel_info.ticket_number_last_4_digits"
    ],
    "auth_fields_ped": [
      "frequent_flyer.frequent_flyer_number | travel_info.ticket_number"
    ]
  }
}
  • auth_fields_all: General authentication fields for all seats.

  • auth_fields_ped: Authentication fields specific to PED login.

2. List of API Requests and Argument Lists#

Below are the API methods provided for implementing PED login:

  1. Get Required Login Fields

  2. Method: getLoginFieldsNeeded(SeatLoginV1.OnSeatLoginFieldsListener listener)

  3. Description: Retrieves authentication fields necessary to log into IPS using a PED. The PED must be paired before invoking this method.

  4. Parameters:

    • listener: A callback interface SeatLoginV1.OnSeatLoginFieldsListener to handle the response.
  5. Response Example

    {
      "auth_fields_ped": {
        "fields": [
          "frequent_flyer.frequent_flyer_number",
          "travel_info.ticket_number"
        ],
        "operator": "or"
      },
      "hashFields": [
        "frequent_flyer.frequent_flyer_number",
        "travel_info.ticket_number"
      ]
    }
    

SeatPairingV1 Initialization

```JAVA
SeatPairingV1.initService(this,
        new IInFlightCallback() {
            @Override
            public void onInitServiceComplete(Object o, String s) {
                // If the initialization succeeds, cast the returned object into SeatPairingV1
                mSeatPairingV1 = (SeatPairingV1) o;
            }

            @Override
            public void onInitServiceFailed(String s, InFlight.Error error) {
                // Handle initialization failure
            }
        }, new InFlight());
```

```JAVA
// Step 1: Get the SeatLoginV1 object from the SeatPairingV1 instance.
// Pairing is required before retrieving the SeatLoginV1 object.
mSeatLoginV1 = mSeatPairingV1.getSeatLogin();
Log.d(TAG, "mSeatLoginV1=" + mSeatLoginV1);

// Step 2: Check if the SeatLoginV1 object is not null.
if (mSeatLoginV1 != null) {
    // Request to get authentication fields needed to log into IPS on the paired seat.
    mSeatLoginV1.getLoginFieldsNeeded(new SeatLoginV1.OnSeatLoginFieldsListener() {

        // Callback method when login fields are received successfully.
        @Override
        public void onSeatLoginFieldsReceived(JSONObject loginfields) {
            Log.d(TAG, "loginfields=" + loginfields);

            // Step 3: Check if 'auth_fields_ped' is present in the received login fields.
            if (loginfields.has("auth_fields_ped")) {
                // Extract the 'auth_fields_ped' JSON object from the login fields.
                mAuthfields = loginfields.optJSONObject("auth_fields_ped");
                Log.d(TAG, "authFields=" + mAuthfields);
            }
        }

        // Callback method when login is successful.
        @Override
        public void onSeatLoginSuccess() {
            // Handle the success scenario here, such as logging.
            Log.d(TAG, "Seat login was successful.");
        }

        // Callback method when there is an error during the login process.
        @Override
        public void onSeatLoginError(SeatLoginV1.SeatLoginError error) {
            // Log the error message for debugging purposes.
            Log.e(TAG, SeatLoginV1.SeatLoginError.getErrorMessage(error));
        }
    });
}
```
  1. Login to IPS

  2. Method: login(Map<String,String> loginFields, SeatLoginV1.OnSeatLoginListener onSeatLoginListener)

  3. Description: Logs the user into the IPS with the provided credentials. The PED must be paired before calling this method.

  4. Parameters:

    • loginFields: A map of login field names and their corresponding values.

    • onSeatLoginListener: A callback interface SeatLoginV1.OnSeatLoginListener to handle the login result.

    // Step 1: Check if SeatPairingV1 object is not null and the seat is already paired.
    if (mSeatPairingV1 != null && mSeatPairingV1.getPairStatus() == SeatPairingV1.PairStatus.PAIRED) {
    
        // Step 2: Retrieve the SeatLoginV1 object from the SeatPairingV1 instance.
        mSeatLoginV1 = mSeatPairingV1.getSeatLogin();
    
        // Step 3: Ensure that the SeatLoginV1 object is not null before proceeding.
        if (mSeatLoginV1 != null) {
    
            // Step 4: Create a map to store login fields and their respective values.
            Map<String, String> fieldsmap = new HashMap<>();
    
            // Step 4: Populate the HashMap with fields from the JSON object received as a response from getLoginFieldsNeeded API
    
            // Step 7: Attempt to log in using the fields map and set up a listener for the result.
            mSeatLoginV1.login(fieldsmap, new SeatLoginV1.OnSeatLoginListener() {
    
                // Callback method when login is successful.
                @Override
                public void onSeatLoginSuccess() {
                    Log.v(TAG, "onSeatLoginSuccess()");
                }
    
                // Callback method when there is an error during the login process.
                @Override
                public void onSeatLoginError(SeatLoginV1.SeatLoginError error) {
                    Log.e(TAG, "onSeatLoginError(): " + error.name());
                }
            });
        }
    }
    
  5. Set Login State Change Listener

  6. Method: setOnSeatLoginStateChangedListener(SeatLoginV1.OnSeatLoginStateChangedListener onSeatLoginStateChangedListener)

  7. Description: Registers a listener for receiving notifications about changes in the login state from the seatback.

  8. Parameters:

    • onSeatLoginStateChangedListener: A callback interface to listen for state changes.
  9. Retrieve Login Service

  10. Method: getSeatLogin()

  11. Description: Returns the service that manages login functionality on the seat.

3. Common Errors for CA Developers#

  1. ERROR_NOT_PAIRED: The PED is not paired with the seat when attempting to retrieve login fields or perform login.

  2. Solution: Ensure the PED is paired with the seat before making any API calls.

  3. Invalid or Missing Authentication Fields: The getAuthFields response may return unexpected fields or be empty if the service_config is misconfigured.

  4. Solution: Verify that the service_config JSON block in the PMD correctly specifies the authentication fields.

  5. Login Failures: Login attempts can fail due to incorrect field values or a mismatch between provided data and what is expected by the system.

  6. Solution: Ensure the data input by the user matches the expected format and values, and that the service_config is correctly set up.

  7. Unexpected Login State Changes: The login state might change unexpectedly if there is interference or a connection issue between the PED and the seatback.

  8. Solution: Implement robust error handling and reconnection logic in the state change listener.

Version 1.0