Authentication
In order to expedite the process of you connecting to the lab, we will provide you the initial password via email when responding to your account request. Typically creating a new account results in an email being sent to you. Once this is in place, you can request a password reset by clicking on the associated "Reset Password" link on the test or operational website.
One of the more common problems people have with their the first web service request is with authentication. The Leidos Flight Service web services use Basic HTTP authentication with Base64 encoding with preemptive authentication. As an example, given an email address and password me@letmein.com:MyPassw0rd!, you can run the following command in Linux to get the base64 encoding:
$ echo -n 'me@letmein.com:MyPassw0rd!' | base64 bWVAbGV0bWVpbi5jb206TXlQYXNzdzByZCE=
Once you have the output from this command, you can then include it in the --header command for your curl command to make the website request (Note the --header parameter with the string from above)
$ /usr/bin/curl -k -A "Mozilla/5.0" -i --header "Authorization: Basic bWVAbGV0bWVpbi5jb206TXlQYXNzdzByZCE=" --data "type=DOMESTIC&flightRules=VFR&aircraftIdentifier=TTTDEMO&departure=HOU&destination=MIA&departureInstant=2015-03-13T00:53:00.0&flightDuration=PT1H30M&route=LEV%20Q102%20CYY%20SSCOT&altDestination1=LAX&altDestination2=SEA&aircraftType=P28A&numberOfAircraft=3&heavyWakeTurbulence=true&aircraftEquipment=G&remarks=This%20is%20a%20domestic%20flight%20plan%20test&speedKnots=100&altitudeFL=35&fuelOnBoard=PT20H0M&pilotData=PILOT%20INFO&peopleOnBoard=1&aircraftColor=W" "https://[Operational or Test Environment URL]/rest/FP/file" -v
HTTP Request Headers
For sending web services, please ensure that your application is configured to use the following HTTP request headers:
- "Content-Type: application/x-www-form-urlencoded”
- (optional) "User-Agent: <Company or Application name> Flight Service Interface.”
Authorization
As part of creating your account, we will authorize the account to make web service calls. Once this is activated, you are authorized to make any of the web service calls available on the WSDL. If you use web services on behalf of an end user (such as filing flight plans, performing briefings, etc.), the web user will need to log into our website and authorize you to make web service calls on their behalf. Without this authorization, you will get an error message in the web service response. To see how this authorization works, try it out in our lab environment.
For more information on how to make this work for you, go here: Service Provider Authorization.