In the sample code entitled "azure-activedirectory-library-for-android" postedhere. More specifically in the "Samples" in the "Hello" project there is a class called 'Constants.java' that one would use to setup the app's configuration to point to the proper end points (IP addresses) in Azure.
I'm having some trouble deciphering what Windows Azure elements should map to what constant values.
This is the class "Constants.java" code listing:
public class Constants { public static final String SDK_VERSION = "1.0"; /** * UTF-8 encoding */ public static final String UTF8_ENCODING = "UTF-8"; public static final String HEADER_AUTHORIZATION = "Authorization"; public static final String HEADER_AUTHORIZATION_VALUE_PREFIX = "Bearer "; // AAD PARAMETERS // https://login.windows.net/tenantInfo static final String AUTHORITY_URL = "https://login.windows.net/common"; // Clientid is given from AAD page when you register your Android app static final String CLIENT_ID = "650a6609-5463-4bc4-b7c6-19df7990a8bc"; // RedirectUri static final String REDIRECT_URL = "http://TaskApp"; // URI for the resource. You need to setup this resource at AAD static final String RESOURCE_ID = "https://omercantest.onmicrosoft.com/AllHandsTry"; // Endpoint we are targeting for the deployed WebAPI service static final String SERVICE_URL = "https://android.azurewebsites.net/api/values"; // ------------------------------------------------------------------------------------------ public static final String SHARED_PREFERENCE_NAME = "com.example.com.test.settings"; public static final String KEY_NAME_ASK_BROKER_INSTALL = "test.settings.ask.broker"; public static final String KEY_NAME_CHECK_BROKER = "test.settings.check.broker"; public static final String LOGIN_HINT = "faruk@omercantest.onmicrosoft.com"; }
The Windows Azure Active Directory application configuration (if I'm understanding the Azure prompts correctly) looks like this:
:Name TodoListService :Sign-on URL https://localhost:44321/ :Client ID b9cc6194-42a4-47ff-b35f-5344356e8101 :KEY kEblTMdu/YHf8Ox1y0eoTVvaDqzzDWPQGBZvUcCAzzz= :APP ID URI https://localhost:44321/ToDoList :Reply URL https://localhost:44321/
My question is exactly which configuration items should replace which class items
to create and construct the proper request to Windows Azure Active Directory? I'm most concerned with"AUTHORITY_URL","RESOURCE_ID" and "SERVICE_URL".
Any help with this matter will save me some lost sleep and will be greatly appreciated...
Edward Walker