Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log a warning message when using non-OIDC endpoints in OIDC mode #70

Merged
merged 2 commits into from
Jan 31, 2017

Conversation

lbalmaceda
Copy link
Contributor

If the account used to create the AuthenticationAPIClient has the OIDCConformant flag disabled and the client (dashboard) has the flag enabled, the requests to /oauth/ro and /oauth/access_token will fail with invalid_request. This PR check's that error and logs a warning message so the user can properly setup the android client and authenticate.

@lbalmaceda lbalmaceda changed the title Log a warning message when OIDC flags mistmatch Log a warning message when OIDC flags mismatch Jan 24, 2017
@@ -85,6 +88,12 @@ public AuthenticationException(Map<String, Object> values) {
}
}

private void warnIfOIDCError() {
if ("invalid_request".equals(getCode()) && getDescription().startsWith("OIDC conformant clients cannot use")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mot ever match description values of errors let's print the error and the recommendation if it's invalid_request

@hzalaz hzalaz changed the title Log a warning message when OIDC flags mismatch Log a warning message when using non-OIDC endpoints in OIDC mode Jan 31, 2017
@hzalaz hzalaz modified the milestones: v1-Next, 1.5.0 Jan 31, 2017
@hzalaz hzalaz merged commit 5020f52 into master Jan 31, 2017
@hzalaz hzalaz deleted the add-oidc-flag-warning branch January 31, 2017 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants