latest 8.1 phone client, talking with ADAL to an API guarded with a token


Made the latest ADAL library for windows 8.1 phone (official, rather than the ADAL-like client in the azure mobile client SDK that also talks now to th windows 8.1 WAB) talk to a API.

WP_20140617_12_47_21_Pro

Several gotchas:

 

1. one has to update the OS on the phone – otherwise the debugger would not work properly.

2. one has to TURN OFF wifi sense – for the proxy settings option to appear (on the wifi access point).

3. one has to use IE on the phone to download the fiddler SSL cert to the phones trust store (http://[ipaddr]:8888 and use the link on the echo service’s page)

4. in our case, ALL pages by the custom IDP supporting the process that javascript support have to have a text/html content type. For us, that meant altering fiddler response handler

static function OnBeforeResponse(oSession: Session) {
        if (m_Hide304s && oSession.responseCode == 304) {
            oSession[“ui-hide”] = “true”;
        }

    oSession.oResponse.headers.Remove(“Content-Type”);
    oSession.oResponse.headers[“Content-Type”] = “text/html”;
}

Original instructions

image

 

Our Existing client

image

clientid: a6e4ee63-87f3-45af-a5db-05099ab9f001

 

our existing server/API registration:

server

image

58c9409a-8c23-4528-9aee-06f989b0723a and FFnQz6yWlaL4F8jBIFAZLszrkKSlQcd6K3cC5ZhhTPE=

Client’s redirect value (that opens up the WAB on 8.1 to save cookies):

image

ms-app://s-1-15-2-3561678808-505168249-741943216-3119207500-4053741782-2196492325-4188087830/

applying

Screen Shot 2014-06-16 at 3.36.40 PM

image

C:\Users\pwilliams\Source\Repos\NativeClient-WindowsPhone8.1\TodoListService\Content

image

 

Now we start the server (with config)

image

image

 

The usual, miserable (and unprofessional) way of discovering a cert-based trust point (25 years and accounting, its no better than it was…)

image

image

NOTE THIS STEP (ITS NOT DOCUMENTED IN THE INTRUCTIONS)

image

image

 

Running both client (in phone emulator 8.1 VM on windows VM running inside apple OS) and server (on windows IIS express, running in an windows VM running on apple OS)

imageOn

Advertisements

About home_pw@msn.com

Computer Programmer who often does network administration with focus on security servers. Very strong in Microsoft Azure cloud!
This entry was posted in AAD. Bookmark the permalink.