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

Remove redundant code in authorization check for SCIM service #31

Closed
jgomer2001 opened this Issue Sep 12, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@jgomer2001
Collaborator

jgomer2001 commented Sep 12, 2017

In oxTrust classes UserWebService, GroupService, and FidoService the following code is written at the beginning of every method... let's refactor

        Response authorizationResponse;
        if (jsonConfigurationService.getOxTrustappConfiguration().isScimTestMode()) {
            log.info(" ##### SCIM Test Mode is ACTIVE");
            authorizationResponse = processTestModeAuthorization(authorization);
        } else {
            authorizationResponse = processAuthorization(authorization);
        }

        if (authorizationResponse != null) {
            return authorizationResponse;
        }

With a single point of authorization check, we can switch or even turn off the authorization mechanism easily for development purposes

@jgomer2001 jgomer2001 added this to the CE 3.2 milestone Sep 12, 2017

@jgomer2001 jgomer2001 self-assigned this Sep 12, 2017

@jgomer2001 jgomer2001 closed this Sep 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment