App credential to string type
This commit is contained in:
+4
-4
@@ -86,12 +86,12 @@ public class AppListController {
|
||||
@RequestMapping(value = { "/account/get" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> getAccount(
|
||||
@RequestParam("credential") int credential,
|
||||
@RequestParam("credential") String credential,
|
||||
@RequestParam("appId") String appId,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
Accounts account = null ;
|
||||
|
||||
if (credential == Apps.CREDENTIALS.USER_DEFINED) {
|
||||
if (credential.equalsIgnoreCase(Apps.CREDENTIALS.USER_DEFINED)) {
|
||||
account = accountsService.load(new Accounts(currentUser.getId(), appId));
|
||||
account.setRelatedPassword(
|
||||
PasswordReciprocal.getInstance().decoder(
|
||||
@@ -110,11 +110,11 @@ public class AppListController {
|
||||
@RequestMapping(value = { "/account/update" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> updateAccount(
|
||||
@RequestParam("credential") int credential,
|
||||
@RequestParam("credential") String credential,
|
||||
@ModelAttribute Accounts account,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
Accounts appUsers = new Accounts();
|
||||
if (credential == Apps.CREDENTIALS.USER_DEFINED) {
|
||||
if (credential.equalsIgnoreCase(Apps.CREDENTIALS.USER_DEFINED)) {
|
||||
appUsers = accountsService.load(new Accounts(currentUser.getId(), account.getAppId()));
|
||||
if (appUsers == null) {
|
||||
appUsers = new Accounts();
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class BaseAppContorller {
|
||||
}
|
||||
|
||||
protected void encodeSharedPassword(Apps application){
|
||||
if(application.getCredential()!=Apps.CREDENTIALS.SHARED){
|
||||
if(!application.getCredential().equalsIgnoreCase(Apps.CREDENTIALS.SHARED)){
|
||||
if(application.getProtocol().equals(ConstsProtocols.FORMBASED)){
|
||||
if(StringUtils.isNotBlank(application.getSharedPassword())){
|
||||
application.setSharedPassword(
|
||||
@@ -83,7 +83,7 @@ public class BaseAppContorller {
|
||||
}
|
||||
|
||||
protected void decoderSharedPassword(Apps application){
|
||||
if(application.getCredential()!=Apps.CREDENTIALS.SHARED){
|
||||
if(application.getCredential().equalsIgnoreCase(Apps.CREDENTIALS.SHARED)){
|
||||
if(application.getProtocol().equals(ConstsProtocols.FORMBASED)){
|
||||
if(StringUtils.isNotBlank(application.getSharedPassword())){
|
||||
application.setSharedPassword(
|
||||
|
||||
Reference in New Issue
Block a user