X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fmusic%2Frest%2FRestMusicAdminAPI.java;h=adcb65847ed3bf27d9423e0452e72587123e5a2c;hb=refs%2Fchanges%2F94%2F79394%2F2;hp=0bca1f99e5189a4e560a2850a932699625ee6736;hpb=7c2316f479f338c4b0fd9a150d8b858cea3b377c;p=music.git diff --git a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java index 0bca1f99..adcb6584 100755 --- a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java @@ -47,7 +47,7 @@ import javax.ws.rs.core.Response.Status; import org.mindrot.jbcrypt.BCrypt; import org.onap.music.authentication.CachingUtil; -import org.onap.music.authentication.MusicAuthentication; +import org.onap.music.authentication.MusicAAFAuthentication; import org.onap.music.authentication.MusicAuthenticator; import org.onap.music.datastore.PreparedQueryObject; import org.onap.music.datastore.jsonobjects.JsonOnboard; @@ -81,7 +81,7 @@ public class RestMusicAdminAPI { // Set to true in env like ONAP. Where access to creating and dropping keyspaces exist. private static final boolean KEYSPACE_ACTIVE = false; - private MusicAuthenticator authenticator = new MusicAuthentication(); + private MusicAuthenticator authenticator = new MusicAAFAuthentication(); /* * API to onboard an application with MUSIC. This is the mandatory first step. @@ -118,7 +118,7 @@ public class RestMusicAdminAPI { ErrorSeverity.CRITICAL, ErrorTypes.AUTHENTICATIONERROR); resultMap.put("Exception", "Unauthorized: Please check the request parameters. Some of the required values appName(ns), userId, password, isAAF are missing."); - return response.status(Status.UNAUTHORIZED).entity(resultMap).build(); + return response.status(Status.BAD_REQUEST).entity(resultMap).build(); } PreparedQueryObject pQuery = new PreparedQueryObject();