Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
updated redirect url to hierarchical uri
Browse files Browse the repository at this point in the history
  • Loading branch information
johnaustin committed Mar 8, 2017
1 parent e146da1 commit 87e641f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Expand Up @@ -41,6 +41,8 @@ public static synchronized AuthenticationManager getInstance(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences("oidc_clientconf", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("oidc_loadfromprefs", true);

//Was false. When false, exception is thrown in OIDCRequestManager, line 378. id is null
editor.putBoolean("oidc_oauth2only", false);
editor.putString("oidc_clientId", Constants.CLIENT_ID);
editor.putString("oidc_redirectUrl", Constants.REDIRECT_URI);
Expand Down
Expand Up @@ -86,6 +86,9 @@ public void onSuccess(String idToken) {
preferredUsername = claims.getPayload().get("preferred_username").toString();
} catch (IOException ioe) {
Log.e(TAG, ioe.getMessage());
} catch (NullPointerException npe) {
Log.e(TAG, npe.getMessage());

}

// Prepare the SendMailActivity intent
Expand Down
Expand Up @@ -4,11 +4,18 @@
*/
package com.microsoft.office365.connectmicrosoftgraph;


/*
These constant values configure the client app to use OAuth2 and open id connect
to authenticate with Azure and authorize the app to access the specified scopes.
Read more about scopes: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-scopes
*/
interface Constants {
String AUTHORITY_URL = "https://login.microsoftonline.com/common";
// Update these two constants with the values for your application:
String CLIENT_ID = "ENTER_YOUR_CLIENT_ID";
String REDIRECT_URI = "https://login.microsoftonline.com/common/oauth2/nativeclient";
String MICROSOFT_GRAPH_API_ENDPOINT_RESOURCE_ID = "https://graph.microsoft.com/";
String SCOPES = "openid profile Mail.Send offline_access";
String SCOPES = "openid profile User.Read Mail.Send offline_access";

}

0 comments on commit 87e641f

Please sign in to comment.