mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 08:59:10 +08:00
m-11/6
This commit is contained in:
parent
623d6551c8
commit
3ce501aa86
@ -51,13 +51,13 @@ public abstract class AbstractAuthenticationRealm{
|
||||
|
||||
private static final String BADPASSWORDCOUNT_RESET_UPDATE_STATEMENT = "UPDATE USERINFO SET BADPASSWORDCOUNT = ? , ISLOCKED = ? ,UNLOCKTIME = ? WHERE ID = ?";
|
||||
|
||||
private static final String HISTORY_LOGIN_INSERT_STATEMENT = "INSERT INTO LOGIN_HISTORY (ID , SESSIONID , UID , USERNAME , DISPLAYNAME , LOGINTYPE , MESSAGE , CODE , PROVIDER , SOURCEIP , BROWSER , PLATFORM , APPLICATION , LOGINURL )VALUES( ? , ? , ? , ? , ?, ? , ? , ?, ? , ? , ?, ? , ? , ?)";
|
||||
private static final String HISTORY_LOGIN_INSERT_STATEMENT = "INSERT INTO HISTORY_LOGIN (ID , SESSIONID , UID , USERNAME , DISPLAYNAME , LOGINTYPE , MESSAGE , CODE , PROVIDER , SOURCEIP , BROWSER , PLATFORM , APPLICATION , LOGINURL )VALUES( ? , ? , ? , ? , ?, ? , ? , ?, ? , ? , ?, ? , ? , ?)";
|
||||
|
||||
private static final String LOGIN_USERINFO_UPDATE_STATEMENT = "UPDATE USERINFO SET LASTLOGINTIME = ? , LASTLOGINIP = ? , LOGINCOUNT = ?, ONLINE = "+UserInfo.ONLINE.ONLINE+" WHERE ID = ?";
|
||||
|
||||
private static final String LOGOUT_USERINFO_UPDATE_STATEMENT = "UPDATE USERINFO SET LASTLOGOFFTIME = ? , ONLINE = "+UserInfo.ONLINE.OFFLINE+" WHERE ID = ?";
|
||||
|
||||
private static final String HISTORY_LOGOUT_UPDATE_STATEMENT = "UPDATE LOGIN_HISTORY SET LOGOUTTIME = ? WHERE SESSIONID = ?";
|
||||
private static final String HISTORY_LOGOUT_UPDATE_STATEMENT = "UPDATE HISTORY_LOGIN SET LOGOUTTIME = ? WHERE SESSIONID = ?";
|
||||
|
||||
private static final String GROUPS_SELECT_STATEMENT = "SELECT DISTINCT G.ID,G.NAME FROM USERINFO U,GROUPS G,GROUP_MEMBER GM WHERE U.ID = ? AND U.ID=GM.MEMBERID AND GM.GROUPID=G.ID ";
|
||||
|
||||
|
||||
@ -17,18 +17,13 @@ public final class PROTOCOLS {
|
||||
|
||||
public static final String FORMBASED = "Form_Based";
|
||||
|
||||
public static final String COOKIEBASED = "Cookie_Based";
|
||||
|
||||
public static final String TOKENBASED = "Token_Based";
|
||||
|
||||
public static final String LTPA = "LTPA";
|
||||
|
||||
//OAuth
|
||||
public static final String OAUTH10A = "OAuth v1.0a";
|
||||
public static final String OAUTH20 = "OAuth v2.0";
|
||||
public static final String OAUTH20 = "OAuth_v2.0";
|
||||
//SAML
|
||||
public static final String SAML11 = "SAML v1.1";
|
||||
public static final String SAML20 = "SAML v2.0";
|
||||
public static final String SAML20 = "SAML_v2.0";
|
||||
|
||||
public static final String OPEN_ID_CONNECT = "OpenID_Connect";
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
|
||||
|
||||
/*
|
||||
@ -18,7 +18,7 @@ import org.maxkey.domain.apps.Applications;
|
||||
constraint PK_ROLES primary key clustered (ID)
|
||||
*/
|
||||
@Table(name = "GROUP_APP")
|
||||
public class GroupPrivileges extends Applications implements Serializable{
|
||||
public class GroupPrivileges extends Apps implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -15,8 +15,8 @@ import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Table(name = "LOGIN_HISTORY")
|
||||
public class LoginHistory extends JpaBaseDomain implements Serializable{
|
||||
@Table(name = "HISTORY_LOGIN")
|
||||
public class HistoryLogin extends JpaBaseDomain implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
@ -60,7 +60,7 @@ public class LoginHistory extends JpaBaseDomain implements Serializable{
|
||||
String startDate;
|
||||
String endDate;
|
||||
|
||||
public LoginHistory() {
|
||||
public HistoryLogin() {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -13,8 +13,8 @@ import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
*
|
||||
*/
|
||||
|
||||
@Table(name = "LOGIN_APPS_HISTORY")
|
||||
public class LoginAppsHistory extends JpaBaseDomain {
|
||||
@Table(name = "HISTORY_LOGIN_APPS")
|
||||
public class HistoryLoginApps extends JpaBaseDomain {
|
||||
|
||||
private static final long serialVersionUID = 5085201575292304749L;
|
||||
@Id
|
||||
@ -42,7 +42,7 @@ public class LoginAppsHistory extends JpaBaseDomain {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public LoginAppsHistory() {
|
||||
public HistoryLoginApps() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -68,7 +68,7 @@ public class LoginAppsHistory extends JpaBaseDomain {
|
||||
* @param sessionId
|
||||
* @param appId
|
||||
*/
|
||||
public LoginAppsHistory(String sessionId, String appId) {
|
||||
public HistoryLoginApps(String sessionId, String appId) {
|
||||
super();
|
||||
this.sessionId = sessionId;
|
||||
this.appId = appId;
|
||||
@ -2,6 +2,8 @@ package org.maxkey.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
|
||||
|
||||
@ -9,7 +11,8 @@ import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
public class Logs extends JpaBaseDomain implements Serializable {
|
||||
@Table(name = "HISTORY_LOGS")
|
||||
public class HistoryLogs extends JpaBaseDomain implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -31,11 +34,11 @@ public class Logs extends JpaBaseDomain implements Serializable {
|
||||
String startDate;
|
||||
String endDate;
|
||||
|
||||
public Logs() {
|
||||
public HistoryLogs() {
|
||||
super();
|
||||
}
|
||||
|
||||
public Logs(String serviceName, String code, String message,
|
||||
public HistoryLogs(String serviceName, String code, String message,
|
||||
String content, String messageType, String operateType,
|
||||
String createdBy, String username, String cname) {
|
||||
super();
|
||||
@ -14,8 +14,8 @@ import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Table(name = "APPLICATIONS")
|
||||
public class Applications extends JpaBaseDomain implements Serializable{
|
||||
@Table(name = "APPS")
|
||||
public class Apps extends JpaBaseDomain implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
@ -43,28 +43,33 @@ public class Applications extends JpaBaseDomain implements Serializable{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column
|
||||
private String name;
|
||||
/*
|
||||
* Login url
|
||||
*/
|
||||
@Column
|
||||
private String loginUrl;
|
||||
|
||||
@Column
|
||||
private String category;
|
||||
|
||||
@Column
|
||||
private String protocol;
|
||||
|
||||
@Column
|
||||
private String secret;
|
||||
/*
|
||||
* icon and icon upload field iconField
|
||||
*/
|
||||
@Column
|
||||
private byte[] icon;
|
||||
private MultipartFile iconFile;
|
||||
|
||||
@Column
|
||||
private int visible;
|
||||
/*
|
||||
* vendor
|
||||
*/
|
||||
@Column
|
||||
private String vendor;
|
||||
@Column
|
||||
private String vendorUrl;
|
||||
|
||||
/*
|
||||
@ -74,13 +79,19 @@ public class Applications extends JpaBaseDomain implements Serializable{
|
||||
* SHARED
|
||||
* NONE
|
||||
*/
|
||||
@Column
|
||||
private int credential;
|
||||
@Column
|
||||
private String sharedUsername;
|
||||
@Column
|
||||
private String sharedPassword;
|
||||
@Column
|
||||
private String systemUserAttr;
|
||||
|
||||
//获取第三方token凭证
|
||||
@Column
|
||||
private String principal;
|
||||
@Column
|
||||
private String credentials;
|
||||
|
||||
/*
|
||||
@ -98,19 +109,31 @@ public class Applications extends JpaBaseDomain implements Serializable{
|
||||
* issuer is domain name
|
||||
* subject is app id append domain name
|
||||
*/
|
||||
@Column
|
||||
private int isSignature;
|
||||
|
||||
@Column
|
||||
private int isAdapter;
|
||||
|
||||
@Column
|
||||
private String adapter;
|
||||
|
||||
protected Accounts appUser;
|
||||
|
||||
@Column
|
||||
protected int sortIndex;
|
||||
|
||||
@Column
|
||||
protected int status;
|
||||
@Column
|
||||
protected String createdBy;
|
||||
@Column
|
||||
protected String createdDate;
|
||||
@Column
|
||||
protected String modifiedBy;
|
||||
@Column
|
||||
protected String modifiedDate;
|
||||
@Column
|
||||
protected String description;
|
||||
|
||||
public Applications() {
|
||||
public Apps() {
|
||||
super();
|
||||
isSignature=BOOLEAN.FALSE;
|
||||
credential=CREDENTIALS.NONE;
|
||||
@ -592,6 +615,46 @@ public class Applications extends JpaBaseDomain implements Serializable{
|
||||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
public void setCreatedDate(String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
public String getModifiedBy() {
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy) {
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
|
||||
public void setModifiedDate(String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Applications [name=" + name + ", loginUrl=" + loginUrl
|
||||
@ -6,8 +6,8 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Table(name = "CAS_DETAILS")
|
||||
public class CasDetails extends Applications {
|
||||
@Table(name = "APPS_CAS_DETAILS")
|
||||
public class AppsCasDetails extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -3,6 +3,8 @@
|
||||
*/
|
||||
package org.maxkey.domain.apps;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.maxkey.domain.Accounts;
|
||||
|
||||
|
||||
@ -10,7 +12,8 @@ import org.maxkey.domain.Accounts;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
public class DesktopDetails extends Applications {
|
||||
@Table(name = "APPS_DESKTOP_DETAILS")
|
||||
public class AppsDesktopDetails extends Apps {
|
||||
|
||||
|
||||
public static final class ParameterType{
|
||||
@ -52,7 +55,7 @@ public class DesktopDetails extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public DesktopDetails() {
|
||||
public AppsDesktopDetails() {
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package org.maxkey.domain.apps;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
public class ExtendApiDetails extends Applications {
|
||||
@Table(name = "APPS_EXTENDAPI_DETAILS")
|
||||
public class AppsExtendApiDetails extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -10,8 +10,8 @@ import javax.persistence.Table;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Table(name = "FORM_BASED_DETAILS")
|
||||
public class FormBasedDetails extends Applications {
|
||||
@Table(name = "APPS_FORM_BASED_DETAILS")
|
||||
public class AppsFormBasedDetails extends Apps {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -34,7 +34,7 @@ public class FormBasedDetails extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public FormBasedDetails() {
|
||||
public AppsFormBasedDetails() {
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package org.maxkey.domain.apps;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.maxkey.domain.apps.oauth2.provider.client.BaseClientDetails;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
public class OAuth20Details extends Applications {
|
||||
@Table(name = "APPS_OAUTH_CLIENT_DETAILS")
|
||||
public class AppsOAuth20Details extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -46,7 +49,7 @@ public class OAuth20Details extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public OAuth20Details() {
|
||||
public AppsOAuth20Details() {
|
||||
super();
|
||||
|
||||
}
|
||||
@ -54,7 +57,7 @@ public class OAuth20Details extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public OAuth20Details(Applications application,BaseClientDetails baseClientDetails) {
|
||||
public AppsOAuth20Details(Apps application,BaseClientDetails baseClientDetails) {
|
||||
super();
|
||||
this.id=application.getId();
|
||||
this.setName(application.getName());
|
||||
@ -14,8 +14,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Table(name = "SAML_V20_DETAILS")
|
||||
public class SAML20Details extends Applications {
|
||||
@Table(name = "APPS_SAML_V20_DETAILS")
|
||||
public class AppsSAML20Details extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -66,12 +66,10 @@ public class SAML20Details extends Applications {
|
||||
/**
|
||||
* for upload
|
||||
*/
|
||||
@Column
|
||||
private MultipartFile certMetaFile;
|
||||
/**
|
||||
* metadata or certificate
|
||||
*/
|
||||
@Column
|
||||
private String fileType;
|
||||
|
||||
/**
|
||||
@ -97,7 +95,7 @@ public class SAML20Details extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public SAML20Details() {
|
||||
public AppsSAML20Details() {
|
||||
super();
|
||||
|
||||
}
|
||||
@ -13,8 +13,8 @@ import javax.persistence.Table;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Table(name = "TOKEN_BASED_DETAILS")
|
||||
public class TokenBasedDetails extends Applications {
|
||||
@Table(name = "APPS_TOKEN_BASED_DETAILS")
|
||||
public class AppsTokenBasedDetails extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -32,6 +32,8 @@ public class TokenBasedDetails extends Applications {
|
||||
private String redirectUri;
|
||||
//
|
||||
@Column
|
||||
private String tokenType;
|
||||
@Column
|
||||
private String cookieName;
|
||||
@Column
|
||||
private String algorithm;
|
||||
@ -58,7 +60,7 @@ public class TokenBasedDetails extends Applications {
|
||||
|
||||
|
||||
|
||||
public TokenBasedDetails() {
|
||||
public AppsTokenBasedDetails() {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -172,6 +174,18 @@ public class TokenBasedDetails extends Applications {
|
||||
|
||||
|
||||
|
||||
public String getTokenType() {
|
||||
return tokenType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setTokenType(String tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getEmployeeNumber() {
|
||||
return employeeNumber;
|
||||
}
|
||||
@ -7,7 +7,7 @@ package org.maxkey.domain.apps;
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
public class UserApplications extends Applications {
|
||||
public class UserApps extends Apps {
|
||||
|
||||
/**
|
||||
*
|
||||
@ -23,7 +23,7 @@ public class UserApplications extends Applications {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public UserApplications() {
|
||||
public UserApps() {
|
||||
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface ApplicationsMapper extends IJpaBaseMapper<Applications> {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsCasDetailsMapper extends IJpaBaseMapper<AppsCasDetails> {
|
||||
|
||||
public AppsCasDetails getAppDetails(String id) ;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.AppsDesktopDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsDesktopDetailsMapper extends IJpaBaseMapper<AppsDesktopDetails> {
|
||||
|
||||
public AppsDesktopDetails getAppDetails(String id);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsFormBasedDetailsMapper extends IJpaBaseMapper<AppsFormBasedDetails> {
|
||||
|
||||
public AppsFormBasedDetails getAppDetails(String id) ;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsMapper extends IJpaBaseMapper<Apps> {
|
||||
|
||||
public int insertApp(Apps app);
|
||||
|
||||
public int updateApp(Apps app);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.AppsSAML20Details;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsSaml20DetailsMapper extends IJpaBaseMapper<AppsSAML20Details> {
|
||||
|
||||
public AppsSAML20Details getAppDetails(String id);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.AppsTokenBasedDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface AppsTokenBasedDetailsMapper extends IJpaBaseMapper<AppsTokenBasedDetails> {
|
||||
|
||||
public AppsTokenBasedDetails getAppDetails(String id);
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface CasDetailsMapper extends IJpaBaseMapper<CasDetails> {
|
||||
|
||||
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.DesktopDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface DesktopDetailsMapper extends IJpaBaseMapper<DesktopDetails> {
|
||||
|
||||
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface FormBasedDetailsMapper extends IJpaBaseMapper<FormBasedDetails> {
|
||||
|
||||
public FormBasedDetails getSassTemplet(String id);
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.LoginAppsHistory;
|
||||
import org.maxkey.domain.HistoryLoginApps;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface LoginAppsHistoryMapper extends IJpaBaseMapper<LoginAppsHistory> {
|
||||
public interface HistoryLoginAppsMapper extends IJpaBaseMapper<HistoryLoginApps> {
|
||||
|
||||
}
|
||||
@ -2,12 +2,12 @@ package org.maxkey.dao.persistence;
|
||||
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.LoginHistory;
|
||||
import org.maxkey.domain.HistoryLogin;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface LoginHistoryMapper extends IJpaBaseMapper<LoginHistory> {
|
||||
public interface HistoryLoginMapper extends IJpaBaseMapper<HistoryLogin> {
|
||||
|
||||
}
|
||||
@ -4,13 +4,13 @@
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.Logs;
|
||||
import org.maxkey.domain.HistoryLogs;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface LogsMapper extends IJpaBaseMapper<Logs> {
|
||||
public interface HistoryLogsMapper extends IJpaBaseMapper<HistoryLogs> {
|
||||
|
||||
|
||||
}
|
||||
@ -6,13 +6,13 @@ package org.maxkey.dao.persistence;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.UserApplications;
|
||||
import org.maxkey.domain.apps.UserApps;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface MyAppsListMapper extends IJpaBaseMapper<UserApplications> {
|
||||
public interface MyAppsListMapper extends IJpaBaseMapper<UserApps> {
|
||||
|
||||
public List<UserApplications> queryMyApps(UserApplications userApplications);
|
||||
public List<UserApps> queryMyApps(UserApps userApplications);
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.SAML20Details;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface Saml20DetailsMapper extends IJpaBaseMapper<SAML20Details> {
|
||||
|
||||
public SAML20Details getSassTemplet(String id);
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.maxkey.dao.persistence;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.apps.TokenBasedDetails;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface TokenBasedDetailsMapper extends IJpaBaseMapper<TokenBasedDetails> {
|
||||
|
||||
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.ApplicationsMapper;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ApplicationsService extends JpaBaseService<Applications>{
|
||||
|
||||
public ApplicationsService() {
|
||||
super(ApplicationsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public ApplicationsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (ApplicationsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsCasDetailsMapper;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsCasDetailsService extends JpaBaseService<AppsCasDetails>{
|
||||
|
||||
public AppsCasDetailsService() {
|
||||
super(AppsCasDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsCasDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (AppsCasDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public AppsCasDetails getAppDetails(String id) {
|
||||
return getMapper().getAppDetails(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsDesktopDetailsMapper;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.maxkey.domain.apps.AppsDesktopDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsDesktopDetailsService extends JpaBaseService<AppsDesktopDetails>{
|
||||
|
||||
public AppsDesktopDetailsService() {
|
||||
super(AppsDesktopDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsDesktopDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (AppsDesktopDetailsMapper)super.getMapper();
|
||||
}
|
||||
public AppsDesktopDetails getAppDetails(String id) {
|
||||
return getMapper().getAppDetails(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsFormBasedDetailsMapper;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsFormBasedDetailsService extends JpaBaseService<AppsFormBasedDetails>{
|
||||
|
||||
public AppsFormBasedDetailsService() {
|
||||
super(AppsFormBasedDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsFormBasedDetailsMapper getMapper() {
|
||||
return (AppsFormBasedDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public AppsFormBasedDetails getAppDetails(String id) {
|
||||
return getMapper().getAppDetails(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsSaml20DetailsMapper;
|
||||
import org.maxkey.domain.apps.AppsSAML20Details;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsSaml20DetailsService extends JpaBaseService<AppsSAML20Details>{
|
||||
|
||||
public AppsSaml20DetailsService() {
|
||||
super(AppsSaml20DetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsSaml20DetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (AppsSaml20DetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public AppsSAML20Details getAppDetails(String id){
|
||||
return getMapper().getAppDetails(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsMapper;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsService extends JpaBaseService<Apps>{
|
||||
|
||||
public AppsService() {
|
||||
super(AppsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (AppsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public boolean insertApp(Apps app) {
|
||||
return ((AppsMapper)super.getMapper()).insertApp(app)>0;
|
||||
};
|
||||
public boolean updateApp(Apps app) {
|
||||
return ((AppsMapper)super.getMapper()).updateApp(app)>0;
|
||||
};
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.AppsTokenBasedDetailsMapper;
|
||||
import org.maxkey.domain.apps.AppsTokenBasedDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AppsTokenBasedDetailsService extends JpaBaseService<AppsTokenBasedDetails>{
|
||||
|
||||
public AppsTokenBasedDetailsService() {
|
||||
super(AppsTokenBasedDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public AppsTokenBasedDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (AppsTokenBasedDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public AppsTokenBasedDetails getAppDetails(String id) {
|
||||
return getMapper().getAppDetails(id);
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.CasDetailsMapper;
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CasDetailsService extends JpaBaseService<CasDetails>{
|
||||
|
||||
public CasDetailsService() {
|
||||
super(CasDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public CasDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (CasDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.DesktopDetailsMapper;
|
||||
import org.maxkey.domain.apps.DesktopDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DesktopDetailsService extends JpaBaseService<DesktopDetails>{
|
||||
|
||||
public DesktopDetailsService() {
|
||||
super(DesktopDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public DesktopDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (DesktopDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.FormBasedDetailsMapper;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class FormBasedDetailsService extends JpaBaseService<FormBasedDetails>{
|
||||
|
||||
public FormBasedDetailsService() {
|
||||
super(FormBasedDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public FormBasedDetailsMapper getMapper() {
|
||||
return (FormBasedDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public FormBasedDetails getSassTemplet(String id){
|
||||
return getMapper().getSassTemplet(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.HistoryLoginAppsMapper;
|
||||
import org.maxkey.domain.HistoryLoginApps;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class HistoryLoginAppsService extends JpaBaseService<HistoryLoginApps>{
|
||||
|
||||
public HistoryLoginAppsService() {
|
||||
super(HistoryLoginAppsMapper.class);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public HistoryLoginAppsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (HistoryLoginAppsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public boolean insert(HistoryLoginApps loginAppsHistory){
|
||||
return getMapper().insert(loginAppsHistory)> 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.HistoryLoginMapper;
|
||||
import org.maxkey.domain.HistoryLogin;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class HistoryLoginService extends JpaBaseService<HistoryLogin>{
|
||||
|
||||
public HistoryLoginService() {
|
||||
super(HistoryLoginMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public HistoryLoginMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (HistoryLoginMapper)super.getMapper();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.HistoryLogsMapper;
|
||||
import org.maxkey.domain.HistoryLogs;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class HistoryLogsService extends JpaBaseService<HistoryLogs>{
|
||||
|
||||
public HistoryLogsService() {
|
||||
super(HistoryLogsMapper.class);
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public HistoryLogsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (HistoryLogsMapper)super.getMapper();
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.LoginAppsHistoryMapper;
|
||||
import org.maxkey.domain.LoginAppsHistory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class LoginAppsHistoryService extends JpaBaseService<LoginAppsHistory>{
|
||||
|
||||
public LoginAppsHistoryService() {
|
||||
super(LoginAppsHistoryMapper.class);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public LoginAppsHistoryMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (LoginAppsHistoryMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public boolean insert(LoginAppsHistory loginAppsHistory){
|
||||
return getMapper().insert(loginAppsHistory)> 0;
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.LoginHistoryMapper;
|
||||
import org.maxkey.domain.LoginHistory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class LoginHistoryService extends JpaBaseService<LoginHistory>{
|
||||
|
||||
public LoginHistoryService() {
|
||||
super(LoginHistoryMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public LoginHistoryMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (LoginHistoryMapper)super.getMapper();
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.LogsMapper;
|
||||
import org.maxkey.domain.Logs;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class LogsService extends JpaBaseService<Logs>{
|
||||
|
||||
public LogsService() {
|
||||
super(LogsMapper.class);
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public LogsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (LogsMapper)super.getMapper();
|
||||
}
|
||||
}
|
||||
@ -4,17 +4,17 @@ import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.MyAppsListMapper;
|
||||
import org.maxkey.domain.apps.UserApplications;
|
||||
import org.maxkey.domain.apps.UserApps;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MyAppsListService extends JpaBaseService<UserApplications>{
|
||||
public class MyAppsListService extends JpaBaseService<UserApps>{
|
||||
|
||||
public MyAppsListService() {
|
||||
super(MyAppsListMapper.class);
|
||||
}
|
||||
|
||||
public List<UserApplications> queryMyApps(UserApplications userApplications){
|
||||
public List<UserApps> queryMyApps(UserApps userApplications){
|
||||
return getMapper().queryMyApps(userApplications);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.Saml20DetailsMapper;
|
||||
import org.maxkey.domain.apps.SAML20Details;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class Saml20DetailsService extends JpaBaseService<SAML20Details>{
|
||||
|
||||
public Saml20DetailsService() {
|
||||
super(Saml20DetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public Saml20DetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (Saml20DetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public SAML20Details getSassTemplet(String id){
|
||||
return getMapper().getSassTemplet(id);
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.dao.persistence.TokenBasedDetailsMapper;
|
||||
import org.maxkey.domain.apps.TokenBasedDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class TokenBasedDetailsService extends JpaBaseService<TokenBasedDetails>{
|
||||
|
||||
public TokenBasedDetailsService() {
|
||||
super(TokenBasedDetailsMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public TokenBasedDetailsMapper getMapper() {
|
||||
// TODO Auto-generated method stub
|
||||
return (TokenBasedDetailsMapper)super.getMapper();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.ApplicationsMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND NAME LIKE '%${name}%'
|
||||
</if>
|
||||
<if test="protocol != null and protocol != ''">
|
||||
AND PROTOCOL = #{protocol}
|
||||
</if>
|
||||
<if test="credential != null and credential != ''">
|
||||
AND CREDENTIAL = #{credential}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND CATEGORY = #{category}
|
||||
</if>
|
||||
<if test="vendor != null and vendor != ''">
|
||||
AND VENDOR = #{vendor}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryPageResults" parameterType="Applications" resultType="Applications">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTORDER
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsCasDetailsMapper">
|
||||
<select id="getAppDetails" parameterType="string" resultType="AppsCasDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPS_CAS_DETAILS CD,
|
||||
APPS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND CD.ID = #{value}
|
||||
AND CD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsDesktopDetailsMapper">
|
||||
|
||||
<select id="getAppDetails" parameterType="string" resultType="AppsDesktopDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPS_DESKTOP_DETAILS DD,
|
||||
APPS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND DD.ID = #{value}
|
||||
AND DD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsFormBasedDetailsMapper">
|
||||
|
||||
<select id="getAppDetails" parameterType="string" resultType="AppsFormBasedDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPS_FORM_BASED_DETAILS FBD,
|
||||
APPS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND FBD.ID = #{value}
|
||||
AND FBD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND NAME LIKE '%${name}%'
|
||||
</if>
|
||||
<if test="protocol != null and protocol != ''">
|
||||
AND PROTOCOL = #{protocol}
|
||||
</if>
|
||||
<if test="credential != null and credential != ''">
|
||||
AND CREDENTIAL = #{credential}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND CATEGORY = #{category}
|
||||
</if>
|
||||
<if test="vendor != null and vendor != ''">
|
||||
AND VENDOR = #{vendor}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryPageResults" parameterType="Apps" resultType="Apps">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPS
|
||||
WHERE
|
||||
(1=1)
|
||||
<include refid="where_statement"/>
|
||||
ORDER BY SORTINDEX
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertApp" parameterType="Apps">
|
||||
INSERT INTO APPS(
|
||||
ID,
|
||||
NAME,
|
||||
ICON,
|
||||
LOGINURL,
|
||||
PROTOCOL,
|
||||
CATEGORY,
|
||||
SECRET,
|
||||
DESCRIPTION,
|
||||
VENDOR,
|
||||
VENDORURL,
|
||||
|
||||
CREDENTIAL,
|
||||
SHAREDUSERNAME,
|
||||
SHAREDPASSWORD,
|
||||
SYSTEMUSERATTR,
|
||||
|
||||
ISEXTENDATTR,
|
||||
EXTENDATTR,
|
||||
|
||||
ISSIGNATURE,
|
||||
|
||||
ISADAPTER,
|
||||
ADAPTER,
|
||||
|
||||
PRINCIPAL,
|
||||
CREDENTIALS,
|
||||
|
||||
VISIBLE,
|
||||
|
||||
SORTINDEX,
|
||||
|
||||
CREATEDBY,
|
||||
CREATEDDATE,
|
||||
|
||||
STATUS
|
||||
)VALUES(
|
||||
#{id},
|
||||
#{name},
|
||||
#{icon},
|
||||
#{loginUrl},
|
||||
#{protocol},
|
||||
#{category},
|
||||
#{secret},
|
||||
#{description},
|
||||
#{vendor} ,
|
||||
#{vendorUrl},
|
||||
|
||||
#{credential},
|
||||
#{sharedUsername},
|
||||
#{sharedPassword},
|
||||
#{systemUserAttr},
|
||||
|
||||
#{isExtendAttr},
|
||||
#{extendAttr},
|
||||
|
||||
#{isSignature},
|
||||
|
||||
#{isAdapter},
|
||||
#{adapter},
|
||||
|
||||
#{principal},
|
||||
#{credentials},
|
||||
|
||||
#{visible},
|
||||
|
||||
#{sortIndex},
|
||||
|
||||
#{createdBy},
|
||||
#{createdDate} ,
|
||||
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateApp" parameterType="Apps" >
|
||||
UPDATE APPS SET
|
||||
NAME = #{name},
|
||||
<if test="icon != null">
|
||||
ICON = #{icon},
|
||||
</if>
|
||||
LOGINURL = #{loginUrl},
|
||||
PROTOCOL = #{protocol},
|
||||
CATEGORY = #{category},
|
||||
SECRET = #{secret},
|
||||
DESCRIPTION = #{description},
|
||||
VENDOR = #{vendor},
|
||||
VENDORURL = #{vendorUrl},
|
||||
|
||||
CREDENTIAL = #{credential},
|
||||
SHAREDUSERNAME = #{sharedUsername},
|
||||
SHAREDPASSWORD = #{sharedPassword},
|
||||
SYSTEMUSERATTR = #{systemUserAttr},
|
||||
|
||||
ISEXTENDATTR = #{isExtendAttr},
|
||||
EXTENDATTR = #{extendAttr},
|
||||
|
||||
ISSIGNATURE = #{isSignature},
|
||||
|
||||
<if test="adapter != null">
|
||||
ISADAPTER = #{isAdapter},
|
||||
ADAPTER = #{adapter},
|
||||
</if>
|
||||
PRINCIPAL = #{principal},
|
||||
CREDENTIALS = #{credentials},
|
||||
VISIBLE = #{visible},
|
||||
SORTINDEX = #{sortIndex},
|
||||
|
||||
MODIFIEDBY = #{modifiedBy},
|
||||
MODIFIEDDATE = #{modifiedDate},
|
||||
|
||||
STATUS = #{status}
|
||||
WHERE
|
||||
ID = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsSaml20DetailsMapper">
|
||||
|
||||
<select id="getAppDetails" parameterType="string" resultType="AppsSaml20Details">
|
||||
SELECT
|
||||
SVD.CERTISSUER,
|
||||
SVD.CERTSUBJECT,
|
||||
SVD.CERTEXPIRATION,
|
||||
SVD.KEYSTORE,
|
||||
SVD.SPACSURL ,
|
||||
SVD.ISSUER,
|
||||
SVD.ENTITYID,
|
||||
SVD.AUDIENCE,
|
||||
SVD.VALIDITYINTERVAL ,
|
||||
SVD.NAMEIDFORMAT,
|
||||
SVD.ENCRYPTED,
|
||||
SVD.BINDING,
|
||||
SVD.NAMEIDCONVERT,
|
||||
APP.*
|
||||
FROM
|
||||
APPS_SAML_V20_DETAILS SVD,
|
||||
APPS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND SVD.ID = #{value}
|
||||
AND SVD.ID = APP.ID
|
||||
AND APP.STATUS = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.AppsTokenBasedDetailsMapper">
|
||||
|
||||
<select id="getAppDetails" parameterType="string" resultType="AppsTokenBasedDetails">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPS_TOKEN_BASED_DETAILS TBD,
|
||||
APPS APP
|
||||
WHERE
|
||||
APP.ID = #{value}
|
||||
AND TBD.ID = #{value}
|
||||
AND TBD.ID = APP.ID
|
||||
AND STATUS = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.CasDetailsMapper">
|
||||
|
||||
</mapper>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.DesktopDetailsMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.FormBasedDetailsMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -22,11 +22,11 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS APPS,
|
||||
GROUP_APP GA
|
||||
APPS APPS,
|
||||
GROUP_PRIVILEGES GP
|
||||
WHERE
|
||||
GA.APPID=APPS.ID
|
||||
AND GA.GROUPID = #{groupId}
|
||||
GP.APPID=APPS.ID
|
||||
AND GP.GROUPID = #{groupId}
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
@ -34,14 +34,14 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS APPS
|
||||
APPS APPS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND APPS.ID NOT IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
GROUP_PRIVILEGES
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.LoginAppsHistoryMapper" >
|
||||
<mapper namespace="org.maxkey.dao.persistence.HistoryLoginAppsMapper" >
|
||||
|
||||
<sql id="dao_where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="queryPageResults" parameterType="LoginAppsHistory" resultType="LoginAppsHistory">
|
||||
<select id="queryPageResults" parameterType="HistoryLoginApps" resultType="HistoryLoginApps">
|
||||
SELECT
|
||||
ID,
|
||||
SESSIONID,
|
||||
@ -44,7 +44,7 @@
|
||||
DISPLAYNAME,
|
||||
DATE_FORMAT(LOGINTIME, '%Y-%m-%d %H:%i:%s') AS LOGINTIME
|
||||
|
||||
FROM LOGIN_APPS_HISTORY
|
||||
FROM HISTORY_LOGIN_APPS
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.LoginHistoryMapper" >
|
||||
<mapper namespace="org.maxkey.dao.persistence.HistoryLoginMapper" >
|
||||
|
||||
<sql id="dao_where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
|
||||
<select id="queryPageResults" parameterType="LoginHistory" resultType="LoginHistory">
|
||||
<select id="queryPageResults" parameterType="HistoryLogin" resultType="HistoryLogin">
|
||||
SELECT
|
||||
ID,
|
||||
SESSIONID,
|
||||
@ -56,7 +56,7 @@
|
||||
LOGINURL,
|
||||
DATE_FORMAT(LOGINTIME, '%Y-%m-%d %H:%i:%s') AS LOGINTIME,
|
||||
DATE_FORMAT(LOGOUTTIME, '%Y-%m-%d %H:%i:%s') AS LOGOUTTIME
|
||||
FROM LOGIN_HISTORY
|
||||
FROM HISTORY_LOGIN
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
</select>
|
||||
|
||||
<update id="logout" parameterType="java.lang.String" >
|
||||
UPDATE LOGIN_HISTORY SET
|
||||
UPDATE HISTORY_LOGIN SET
|
||||
LOGOUTTIME = current_timestamp()
|
||||
WHERE
|
||||
SESSIONID = #{value}
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.LogsMapper" >
|
||||
<mapper namespace="org.maxkey.dao.persistence.HistoryLogsMapper" >
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
@ -31,7 +31,7 @@
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryPageResults" parameterType="Logs" resultType="Logs">
|
||||
<select id="queryPageResults" parameterType="HistoryLogs" resultType="HistoryLogs">
|
||||
SELECT
|
||||
ID,
|
||||
TID,
|
||||
@ -45,7 +45,7 @@
|
||||
USERNAME,
|
||||
CREATEDDATE,
|
||||
CREATEDBY
|
||||
FROM LOGS
|
||||
FROM HISTORY_LOGS
|
||||
WHERE 1 = 1
|
||||
<include refid="where_statement"/>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.MyAppsListMapper">
|
||||
|
||||
<select id="queryMyApps" parameterType="UserApplications" resultType="UserApplications">
|
||||
<select id="queryMyApps" parameterType="UserApps" resultType="UserApps">
|
||||
SELECT DISTINCT
|
||||
APP.*
|
||||
FROM
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.Saml20DetailsMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.maxkey.dao.persistence.TokenBasedDetailsMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -9,9 +9,9 @@ import org.apache.mybatis.jpa.util.WebContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.maxkey.dao.service.AccountsService;
|
||||
import org.maxkey.dao.service.FormBasedDetailsService;
|
||||
import org.maxkey.dao.service.AppsFormBasedDetailsService;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.maxkey.util.PathUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -8,8 +8,8 @@ import java.util.List;
|
||||
import org.apache.mybatis.jpa.util.WebContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.maxkey.dao.service.FormBasedDetailsService;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.dao.service.AppsFormBasedDetailsService;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.maxkey.util.PathUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -22,10 +22,10 @@ public class FormBasedDetailsServiceTest {
|
||||
|
||||
public static ApplicationContext context;
|
||||
|
||||
public static FormBasedDetailsService service;
|
||||
public static AppsFormBasedDetailsService service;
|
||||
|
||||
public FormBasedDetailsService getservice() {
|
||||
service=(FormBasedDetailsService)WebContext.getBean("formBasedDetailsService");
|
||||
public AppsFormBasedDetailsService getservice() {
|
||||
service=(AppsFormBasedDetailsService)WebContext.getBean("formBasedDetailsService");
|
||||
return service;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ public class FormBasedDetailsServiceTest {
|
||||
public void insert() throws Exception{
|
||||
_logger.info("insert...");
|
||||
|
||||
FormBasedDetails formBasedDetails=new FormBasedDetails();
|
||||
AppsFormBasedDetails formBasedDetails=new AppsFormBasedDetails();
|
||||
|
||||
service.insert(formBasedDetails);
|
||||
|
||||
@ -45,7 +45,7 @@ public class FormBasedDetailsServiceTest {
|
||||
@Test
|
||||
public void get() throws Exception{
|
||||
_logger.info("get...");
|
||||
FormBasedDetails formBasedDetails=service.get("850379a1-7923-4f6b-90be-d363b2dfd2ca");
|
||||
AppsFormBasedDetails formBasedDetails=service.get("850379a1-7923-4f6b-90be-d363b2dfd2ca");
|
||||
|
||||
_logger.info("formBasedDetails "+formBasedDetails);
|
||||
|
||||
@ -56,7 +56,7 @@ public class FormBasedDetailsServiceTest {
|
||||
public void remove() throws Exception{
|
||||
|
||||
_logger.info("remove...");
|
||||
FormBasedDetails formBasedDetails=new FormBasedDetails();
|
||||
AppsFormBasedDetails formBasedDetails=new AppsFormBasedDetails();
|
||||
formBasedDetails.setId("921d3377-937a-4578-b1e2-92fb23b5e512");
|
||||
service.remove(formBasedDetails.getId());
|
||||
|
||||
@ -77,7 +77,7 @@ public class FormBasedDetailsServiceTest {
|
||||
public void queryPageResults() throws Exception{
|
||||
|
||||
_logger.info("queryPageResults...");
|
||||
FormBasedDetails formBasedDetails=new FormBasedDetails();
|
||||
AppsFormBasedDetails formBasedDetails=new AppsFormBasedDetails();
|
||||
//student.setId("af04d610-6092-481e-9558-30bd63ef783c");
|
||||
// student.setStdGender("M");
|
||||
//student.setStdMajor(政治");
|
||||
@ -90,7 +90,7 @@ public class FormBasedDetailsServiceTest {
|
||||
public void queryPageResultsByMapperId() throws Exception{
|
||||
|
||||
_logger.info("queryPageResults by mapperId...");
|
||||
FormBasedDetails formBasedDetails=new FormBasedDetails();
|
||||
AppsFormBasedDetails formBasedDetails=new AppsFormBasedDetails();
|
||||
// student.setStdGender("M");
|
||||
//student.setStdMajor(政治");
|
||||
// student.setPageResults(10);
|
||||
|
||||
1
maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore
vendored
Normal file
1
maxkey-protocols/maxkey-protocol-authorize/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/org/
|
||||
@ -6,10 +6,10 @@ package org.maxkey.authz.endpoint;
|
||||
import org.maxkey.config.ApplicationConfig;
|
||||
import org.maxkey.crypto.ReciprocalUtils;
|
||||
import org.maxkey.dao.service.AccountsService;
|
||||
import org.maxkey.dao.service.ApplicationsService;
|
||||
import org.maxkey.dao.service.AppsService;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -25,8 +25,8 @@ public class AuthorizeBaseEndpoint {
|
||||
final static Logger _logger = LoggerFactory.getLogger(AuthorizeBaseEndpoint.class);
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applicationsService")
|
||||
protected ApplicationsService applicationsService;
|
||||
@Qualifier("appsService")
|
||||
protected AppsService appsService;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applicationConfig")
|
||||
@ -36,58 +36,58 @@ public class AuthorizeBaseEndpoint {
|
||||
AccountsService accountsService;
|
||||
|
||||
|
||||
protected Applications getApplication(String id){
|
||||
Applications application=(Applications)WebContext.getAttribute(AuthorizeBaseEndpoint.class.getName());
|
||||
protected Apps getApp(String id){
|
||||
Apps app=(Apps)WebContext.getAttribute(AuthorizeBaseEndpoint.class.getName());
|
||||
//session中为空或者id不一致重新加载
|
||||
if(application==null||!application.getId().equalsIgnoreCase(id)) {
|
||||
application=applicationsService.get(id);
|
||||
if(app==null||!app.getId().equalsIgnoreCase(id)) {
|
||||
app=appsService.get(id);
|
||||
}
|
||||
if(application == null){
|
||||
if(app == null){
|
||||
_logger.error("Applications for id "+id + " is null");
|
||||
}
|
||||
WebContext.setAttribute(AuthorizeBaseEndpoint.class.getName(), application);
|
||||
return application;
|
||||
WebContext.setAttribute(AuthorizeBaseEndpoint.class.getName(), app);
|
||||
return app;
|
||||
}
|
||||
|
||||
protected Accounts getAppAccounts(Applications app){
|
||||
Accounts appAccount=new Accounts();
|
||||
protected Accounts getAccounts(Apps app){
|
||||
Accounts account=new Accounts();
|
||||
UserInfo userInfo=WebContext.getUserInfo();
|
||||
Applications application= getApplication(app.getId());
|
||||
if(application.getCredential()==Applications.CREDENTIALS.USER_DEFINED){
|
||||
Apps application= getApp(app.getId());
|
||||
if(application.getCredential()==Apps.CREDENTIALS.USER_DEFINED){
|
||||
|
||||
appAccount=accountsService.load(new Accounts(userInfo.getId(),application.getId()));
|
||||
if(appAccount!=null){
|
||||
appAccount.setRelatedPassword(ReciprocalUtils.decoder(appAccount.getRelatedPassword()));
|
||||
account=accountsService.load(new Accounts(userInfo.getId(),application.getId()));
|
||||
if(account!=null){
|
||||
account.setRelatedPassword(ReciprocalUtils.decoder(account.getRelatedPassword()));
|
||||
}
|
||||
}else if(application.getCredential()==Applications.CREDENTIALS.SHARED){
|
||||
}else if(application.getCredential()==Apps.CREDENTIALS.SHARED){
|
||||
|
||||
appAccount.setRelatedUsername(application.getSharedUsername());
|
||||
appAccount.setRelatedPassword(ReciprocalUtils.decoder(application.getSharedPassword()));
|
||||
account.setRelatedUsername(application.getSharedUsername());
|
||||
account.setRelatedPassword(ReciprocalUtils.decoder(application.getSharedPassword()));
|
||||
|
||||
}else if(application.getCredential()==Applications.CREDENTIALS.SYSTEM){
|
||||
}else if(application.getCredential()==Apps.CREDENTIALS.SYSTEM){
|
||||
|
||||
if(application.getSystemUserAttr().equalsIgnoreCase("uid")){
|
||||
appAccount.setUsername(userInfo.getId());
|
||||
account.setUsername(userInfo.getId());
|
||||
}else if(application.getSystemUserAttr().equalsIgnoreCase("username")){
|
||||
appAccount.setUsername(userInfo.getUsername());
|
||||
account.setUsername(userInfo.getUsername());
|
||||
}else if(application.getSystemUserAttr().equalsIgnoreCase("employeeNumber")){
|
||||
appAccount.setUsername(userInfo.getEmployeeNumber());
|
||||
account.setUsername(userInfo.getEmployeeNumber());
|
||||
}else if(application.getSystemUserAttr().equalsIgnoreCase("email")){
|
||||
appAccount.setUsername(userInfo.getEmail());
|
||||
account.setUsername(userInfo.getEmail());
|
||||
}else if(application.getSystemUserAttr().equalsIgnoreCase("windowsAccount")){
|
||||
appAccount.setUsername(userInfo.getWindowsAccount());
|
||||
account.setUsername(userInfo.getWindowsAccount());
|
||||
}
|
||||
//decoder database stored encode password
|
||||
appAccount.setRelatedPassword(ReciprocalUtils.decoder(WebContext.getUserInfo().getDecipherable()));
|
||||
account.setRelatedPassword(ReciprocalUtils.decoder(WebContext.getUserInfo().getDecipherable()));
|
||||
|
||||
|
||||
}else if(application.getCredential()==Applications.CREDENTIALS.NONE){
|
||||
}else if(application.getCredential()==Apps.CREDENTIALS.NONE){
|
||||
|
||||
appAccount.setUsername(userInfo.getUsername());
|
||||
appAccount.setRelatedPassword(userInfo.getUsername());
|
||||
account.setUsername(userInfo.getUsername());
|
||||
account.setRelatedPassword(userInfo.getUsername());
|
||||
|
||||
}
|
||||
return appAccount;
|
||||
return account;
|
||||
}
|
||||
|
||||
public ModelAndView generateInitCredentialModelAndView(String appId,String redirect_uri){
|
||||
|
||||
@ -55,7 +55,7 @@ public class AuthorizeCredentialEndpoint extends AuthorizeBaseEndpoint{
|
||||
appUser.setDisplayName(userInfo.getDisplayName());
|
||||
|
||||
appUser.setAppId(appId);
|
||||
appUser.setAppName(getApplication(appId).getName());
|
||||
appUser.setAppName(getApp(appId).getName());
|
||||
|
||||
appUser.setRelatedUsername(identity_username);
|
||||
appUser.setRelatedPassword(ReciprocalUtils.encode(identity_password));
|
||||
|
||||
@ -8,8 +8,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import org.maxkey.authz.oauth2.provider.ClientDetailsService;
|
||||
import org.maxkey.client.utils.HttpEncoder;
|
||||
import org.maxkey.constants.PROTOCOLS;
|
||||
import org.maxkey.dao.service.CasDetailsService;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.dao.service.AppsCasDetailsService;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.oauth2.provider.ClientDetails;
|
||||
import org.maxkey.web.WebConstants;
|
||||
import org.maxkey.web.WebContext;
|
||||
@ -33,7 +33,7 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
private ClientDetailsService clientDetailsService;
|
||||
|
||||
@Autowired
|
||||
CasDetailsService casDetailsService;
|
||||
AppsCasDetailsService casDetailsService;
|
||||
|
||||
//all single sign on url
|
||||
@RequestMapping("/authz/{id}")
|
||||
@ -43,7 +43,7 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
|
||||
ModelAndView modelAndView=null;
|
||||
|
||||
Applications application=getApplication(id);
|
||||
Apps application=getApp(id);
|
||||
WebContext.setAttribute(WebConstants.SINGLE_SIGN_ON_APP_ID, id);
|
||||
|
||||
if(application.getProtocol().equalsIgnoreCase(PROTOCOLS.EXTEND_API)){
|
||||
@ -68,8 +68,6 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
modelAndView=WebContext.forward("/authz/saml20/idpinit/"+application.getId());
|
||||
}else if (application.getProtocol().equalsIgnoreCase(PROTOCOLS.TOKENBASED)){
|
||||
modelAndView=WebContext.forward("/authorize/tokenbased/"+id);
|
||||
}else if (application.getProtocol().equalsIgnoreCase(PROTOCOLS.LTPA)){
|
||||
modelAndView=WebContext.forward("/authz/ltpa/"+id);
|
||||
}else if (application.getProtocol().equalsIgnoreCase(PROTOCOLS.CAS)){
|
||||
modelAndView=WebContext.forward("/authz/cas/"+id);
|
||||
}else if (application.getProtocol().equalsIgnoreCase(PROTOCOLS.DESKTOP)){
|
||||
@ -87,7 +85,7 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public ModelAndView authorizeOAuth10a(
|
||||
@PathVariable("id") String id){
|
||||
|
||||
String redirec_uri=getApplication(id).getLoginUrl();
|
||||
String redirec_uri=getApp(id).getLoginUrl();
|
||||
return WebContext.redirect(redirec_uri);
|
||||
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import org.maxkey.crypto.cert.CertSigner;
|
||||
import org.maxkey.crypto.keystore.KeyStoreLoader;
|
||||
import org.maxkey.crypto.password.PasswordReciprocal;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -24,7 +24,7 @@ public abstract class AbstractAuthorizeAdapter {
|
||||
|
||||
public abstract String generateInfo(UserInfo userInfo,Object app);
|
||||
|
||||
public String sign(String data,Applications app){
|
||||
public String sign(String data,Apps app){
|
||||
if(BOOLEAN.isTrue(app.getIsSignature())){
|
||||
KeyStoreLoader keyStoreLoader=(KeyStoreLoader)WebContext.getBean("keyStoreLoader");
|
||||
try {
|
||||
|
||||
1
maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore
vendored
Normal file
1
maxkey-protocols/maxkey-protocol-cas/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/org/
|
||||
1
maxkey-protocols/maxkey-protocol-cas/bin/test/.gitignore
vendored
Normal file
1
maxkey-protocols/maxkey-protocol-cas/bin/test/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/com/
|
||||
@ -15,7 +15,7 @@ import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.config.ApplicationConfig;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.dao.service.CasDetailsService;
|
||||
import org.maxkey.dao.service.AppsCasDetailsService;
|
||||
import org.maxkey.dao.service.UserInfoService;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.util.Instance;
|
||||
@ -37,7 +37,7 @@ public class Cas20AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
|
||||
final static Logger _logger = LoggerFactory.getLogger(Cas20AuthorizeEndpoint.class);
|
||||
@Autowired
|
||||
CasDetailsService casDetailsService;
|
||||
AppsCasDetailsService casDetailsService;
|
||||
|
||||
@Autowired
|
||||
ApplicationConfig applicationConfig;
|
||||
|
||||
@ -14,7 +14,7 @@ import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.config.ApplicationConfig;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.dao.service.CasDetailsService;
|
||||
import org.maxkey.dao.service.AppsCasDetailsService;
|
||||
import org.maxkey.dao.service.UserInfoService;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.util.Instance;
|
||||
@ -36,7 +36,7 @@ public class Cas30AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
|
||||
final static Logger _logger = LoggerFactory.getLogger(Cas30AuthorizeEndpoint.class);
|
||||
@Autowired
|
||||
CasDetailsService casDetailsService;
|
||||
AppsCasDetailsService casDetailsService;
|
||||
|
||||
@Autowired
|
||||
ApplicationConfig applicationConfig;
|
||||
|
||||
@ -13,8 +13,8 @@ import org.maxkey.authz.cas.endpoint.ticket.ServiceTicketImpl;
|
||||
import org.maxkey.authz.cas.endpoint.ticket.service.TicketServices;
|
||||
import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.config.ApplicationConfig;
|
||||
import org.maxkey.dao.service.CasDetailsService;
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
import org.maxkey.dao.service.AppsCasDetailsService;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.maxkey.web.WebConstants;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -37,7 +37,7 @@ public class CasAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
final static Logger _logger = LoggerFactory.getLogger(CasAuthorizeEndpoint.class);
|
||||
|
||||
@Autowired
|
||||
CasDetailsService casDetailsService;
|
||||
AppsCasDetailsService casDetailsService;
|
||||
|
||||
@Autowired
|
||||
ApplicationConfig applicationConfig;
|
||||
@ -52,10 +52,10 @@ public class CasAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
HttpServletResponse response,
|
||||
@RequestParam(value=CasConstants.PARAMETER.SERVICE,required=false) String casService){
|
||||
|
||||
CasDetails casDetails=new CasDetails();
|
||||
AppsCasDetails casDetails=new AppsCasDetails();
|
||||
casDetails.setService(casService);
|
||||
|
||||
List<CasDetails> casDetailsList=casDetailsService.query(casDetails);
|
||||
List<AppsCasDetails> casDetailsList=casDetailsService.query(casDetails);
|
||||
|
||||
casDetails=(casDetailsList!=null && casDetailsList.size()==1)?casDetailsList.get(0):null;
|
||||
|
||||
@ -69,12 +69,12 @@ public class CasAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
HttpServletResponse response,
|
||||
@PathVariable("id") String id){
|
||||
|
||||
CasDetails casDetails=casDetailsService.get(id);
|
||||
AppsCasDetails casDetails=casDetailsService.get(id);
|
||||
|
||||
return buildCasModelAndView(casDetails);
|
||||
}
|
||||
|
||||
private ModelAndView buildCasModelAndView(CasDetails casDetails){
|
||||
private ModelAndView buildCasModelAndView(AppsCasDetails casDetails){
|
||||
|
||||
_logger.debug(""+casDetails);
|
||||
|
||||
@ -88,7 +88,7 @@ public class CasAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response){
|
||||
|
||||
CasDetails casDetails=(CasDetails)WebContext.getAttribute(CasConstants.PARAMETER.ENDPOINT_CAS_DETAILS);
|
||||
AppsCasDetails casDetails=(AppsCasDetails)WebContext.getAttribute(CasConstants.PARAMETER.ENDPOINT_CAS_DETAILS);
|
||||
ServiceTicketImpl serviceTicket=new ServiceTicketImpl(WebContext.getAuthentication(),casDetails);
|
||||
|
||||
String ticket=ticketServices.createTicket(serviceTicket);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package org.maxkey.authz.cas.endpoint.ticket;
|
||||
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@ -55,7 +55,7 @@ public abstract class AbstractTicket implements Ticket {
|
||||
|
||||
protected Authentication authentication;
|
||||
|
||||
protected CasDetails casDetails;
|
||||
protected AppsCasDetails casDetails;
|
||||
/**
|
||||
* Instantiates a new abstract ticket.
|
||||
*/
|
||||
@ -131,7 +131,7 @@ public abstract class AbstractTicket implements Ticket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CasDetails getCasDetails() {
|
||||
public AppsCasDetails getCasDetails() {
|
||||
// TODO Auto-generated method stub
|
||||
return this.casDetails;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package org.maxkey.authz.cas.endpoint.ticket;
|
||||
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
import javax.persistence.Column;
|
||||
@ -55,7 +55,7 @@ public class ServiceTicketImpl extends AbstractTicket {
|
||||
/**
|
||||
* Instantiates a new service ticket impl.
|
||||
*/
|
||||
public ServiceTicketImpl(Authentication authentication,CasDetails casDetails) {
|
||||
public ServiceTicketImpl(Authentication authentication,AppsCasDetails casDetails) {
|
||||
// exists for JPA purposes
|
||||
this.authentication=authentication;
|
||||
this.casDetails=casDetails;
|
||||
|
||||
@ -3,7 +3,7 @@ package org.maxkey.authz.cas.endpoint.ticket;
|
||||
import java.io.Serializable;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
import org.maxkey.domain.apps.CasDetails;
|
||||
import org.maxkey.domain.apps.AppsCasDetails;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
@ -78,7 +78,7 @@ public interface Ticket extends Serializable, Comparable<Ticket> {
|
||||
|
||||
ZonedDateTime getPreviousTimeUsed();
|
||||
|
||||
CasDetails getCasDetails();
|
||||
AppsCasDetails getCasDetails();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -9,9 +9,9 @@ import org.maxkey.authz.desktop.endpoint.adapter.DesktopDefaultAdapter;
|
||||
import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.dao.service.DesktopDetailsService;
|
||||
import org.maxkey.dao.service.AppsDesktopDetailsService;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.maxkey.domain.apps.DesktopDetails;
|
||||
import org.maxkey.domain.apps.AppsDesktopDetails;
|
||||
import org.maxkey.util.Instance;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -31,7 +31,7 @@ public class DesktopAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
final static Logger _logger = LoggerFactory.getLogger(DesktopAuthorizeEndpoint.class);
|
||||
|
||||
@Autowired
|
||||
DesktopDetailsService desktopDetailsService;
|
||||
AppsDesktopDetailsService desktopDetailsService;
|
||||
|
||||
DesktopDefaultAdapter defaultDesktopAdapter=new DesktopDefaultAdapter();
|
||||
|
||||
@ -39,10 +39,10 @@ public class DesktopAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
@PathVariable("id") String id){
|
||||
DesktopDetails desktopDetails=desktopDetailsService.get(id);
|
||||
AppsDesktopDetails desktopDetails=desktopDetailsService.get(id);
|
||||
_logger.debug(""+desktopDetails);
|
||||
|
||||
Accounts appUser=getAppAccounts(desktopDetails);
|
||||
Accounts appUser=getAccounts(desktopDetails);
|
||||
if(appUser == null){
|
||||
return generateInitCredentialModelAndView(id,"/authorize/desktop/"+id);
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@ import java.util.HashMap;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.crypto.HexUtils;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.DesktopDetails;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.AppsDesktopDetails;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.util.StringGenerator;
|
||||
import org.slf4j.Logger;
|
||||
@ -17,14 +17,14 @@ public class DesktopDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
final static Logger _logger = LoggerFactory.getLogger(DesktopDefaultAdapter.class);
|
||||
@Override
|
||||
public String generateInfo(UserInfo userInfo,Object app) {
|
||||
DesktopDetails details=(DesktopDetails)app;
|
||||
AppsDesktopDetails details=(AppsDesktopDetails)app;
|
||||
String parameter=details.getParameter()==null?"":details.getParameter();
|
||||
|
||||
if(details.getUsernameType().equalsIgnoreCase(DesktopDetails.ParameterType.PARAMETER)){
|
||||
if(details.getUsernameType().equalsIgnoreCase(AppsDesktopDetails.ParameterType.PARAMETER)){
|
||||
parameter = parameter+ " "+details.getUsernameParameter();
|
||||
parameter = parameter+ " "+ details.getAppUser().getRelatedUsername();
|
||||
}
|
||||
if(details.getPasswordType().equalsIgnoreCase(DesktopDetails.ParameterType.PARAMETER)){
|
||||
if(details.getPasswordType().equalsIgnoreCase(AppsDesktopDetails.ParameterType.PARAMETER)){
|
||||
parameter = parameter+ " "+details.getPasswordParameter();
|
||||
parameter = parameter+ " "+ details.getAppUser().getRelatedPassword();
|
||||
}
|
||||
@ -64,7 +64,7 @@ public class DesktopDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
* @see com.connsec.web.authorize.endpoint.adapter.AbstractAuthorizeAdapter#sign(java.lang.String, com.connsec.domain.apps.Applications)
|
||||
*/
|
||||
@Override
|
||||
public String sign(String data, Applications app) {
|
||||
public String sign(String data, Apps app) {
|
||||
String signData=super.sign(data, app);
|
||||
return signData;
|
||||
}
|
||||
@ -72,7 +72,7 @@ public class DesktopDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/desktop_sso_execute");
|
||||
DesktopDetails details=(DesktopDetails)app;
|
||||
AppsDesktopDetails details=(AppsDesktopDetails)app;
|
||||
modelAndView.addObject("username", details.getAppUser().getRelatedUsername());
|
||||
modelAndView.addObject("password", details.getAppUser().getRelatedPassword());
|
||||
modelAndView.addObject("encoderParam", data);
|
||||
|
||||
@ -5,8 +5,8 @@ import java.util.HashMap;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.crypto.HexUtils;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.DesktopDetails;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.AppsDesktopDetails;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.util.StringGenerator;
|
||||
import org.slf4j.Logger;
|
||||
@ -17,14 +17,14 @@ public class DesktopQQAdapter extends AbstractAuthorizeAdapter {
|
||||
final static Logger _logger = LoggerFactory.getLogger(DesktopQQAdapter.class);
|
||||
@Override
|
||||
public String generateInfo(UserInfo userInfo,Object app) {
|
||||
DesktopDetails details=(DesktopDetails)app;
|
||||
AppsDesktopDetails details=(AppsDesktopDetails)app;
|
||||
String parameter=details.getParameter()==null?"":details.getParameter();
|
||||
|
||||
if(details.getUsernameType().equalsIgnoreCase(DesktopDetails.ParameterType.PARAMETER)){
|
||||
if(details.getUsernameType().equalsIgnoreCase(AppsDesktopDetails.ParameterType.PARAMETER)){
|
||||
parameter = parameter+ " "+details.getUsernameParameter();
|
||||
parameter = parameter+ " "+ details.getAppUser().getRelatedUsername();
|
||||
}
|
||||
if(details.getPasswordType().equalsIgnoreCase(DesktopDetails.ParameterType.PARAMETER)){
|
||||
if(details.getPasswordType().equalsIgnoreCase(AppsDesktopDetails.ParameterType.PARAMETER)){
|
||||
parameter = parameter+ " "+details.getPasswordParameter();
|
||||
parameter = parameter+ " "+ details.getAppUser().getRelatedPassword();
|
||||
}
|
||||
@ -64,7 +64,7 @@ public class DesktopQQAdapter extends AbstractAuthorizeAdapter {
|
||||
* @see com.connsec.web.authorize.endpoint.adapter.AbstractAuthorizeAdapter#sign(java.lang.String, com.connsec.domain.apps.Applications)
|
||||
*/
|
||||
@Override
|
||||
public String sign(String data, Applications app) {
|
||||
public String sign(String data, Apps app) {
|
||||
String signData=super.sign(data, app);
|
||||
return signData;
|
||||
}
|
||||
@ -72,7 +72,7 @@ public class DesktopQQAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/desktop_qq_sso_execute");
|
||||
DesktopDetails details=(DesktopDetails)app;
|
||||
AppsDesktopDetails details=(AppsDesktopDetails)app;
|
||||
modelAndView.addObject("username", details.getAppUser().getRelatedUsername());
|
||||
modelAndView.addObject("password", details.getAppUser().getRelatedPassword());
|
||||
modelAndView.addObject("encoderParam", data);
|
||||
|
||||
@ -9,7 +9,7 @@ import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.util.Instance;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -30,11 +30,11 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
@RequestMapping("/authz/api/{id}")
|
||||
public ModelAndView authorize(HttpServletRequest request,@PathVariable("id") String id){
|
||||
|
||||
Applications apps=getApplication(id);
|
||||
Apps apps=getApp(id);
|
||||
_logger.debug(""+apps);
|
||||
|
||||
if(BOOLEAN.isTrue(apps.getIsAdapter())){
|
||||
Accounts appUser=getAppAccounts(apps);
|
||||
Accounts appUser=getAccounts(apps);
|
||||
|
||||
if(appUser == null){
|
||||
return generateInitCredentialModelAndView(id,"/authorize/api/"+id);
|
||||
@ -53,7 +53,7 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
modelAndView);
|
||||
return modelAndView;
|
||||
}else{
|
||||
String redirec_uri=getApplication(id).getLoginUrl();
|
||||
String redirec_uri=getApp(id).getLoginUrl();
|
||||
return WebContext.redirect(redirec_uri);
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import org.maxkey.client.oauth.model.Token;
|
||||
import org.maxkey.client.utils.JsonUtils;
|
||||
import org.maxkey.domain.ExtraAttrs;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -32,7 +32,7 @@ public class ExtendApiQQExmailDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
Applications details=(Applications)app;
|
||||
Apps details=(Apps)app;
|
||||
//extraAttrs from Applications
|
||||
ExtraAttrs extraAttrs=null;
|
||||
if(details.getIsExtendAttr()==1){
|
||||
|
||||
@ -9,10 +9,10 @@ import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.authz.formbased.endpoint.adapter.FormBasedDefaultAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.dao.service.FormBasedDetailsService;
|
||||
import org.maxkey.dao.service.AppsFormBasedDetailsService;
|
||||
import org.maxkey.domain.Accounts;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.maxkey.util.Instance;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -32,7 +32,7 @@ public class FormBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
final static Logger _logger = LoggerFactory.getLogger(FormBasedAuthorizeEndpoint.class);
|
||||
|
||||
@Autowired
|
||||
FormBasedDetailsService formBasedDetailsService;
|
||||
AppsFormBasedDetailsService formBasedDetailsService;
|
||||
|
||||
FormBasedDefaultAdapter defaultFormBasedAdapter=new FormBasedDefaultAdapter();
|
||||
|
||||
@ -40,14 +40,14 @@ public class FormBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
public ModelAndView authorize(
|
||||
HttpServletRequest request,
|
||||
@PathVariable("id") String id){
|
||||
FormBasedDetails formBasedDetails=formBasedDetailsService.get(id);
|
||||
AppsFormBasedDetails formBasedDetails=formBasedDetailsService.get(id);
|
||||
_logger.debug(""+formBasedDetails);
|
||||
Applications application= getApplication(id);
|
||||
Apps application= getApp(id);
|
||||
formBasedDetails.setAdapter(application.getAdapter());
|
||||
formBasedDetails.setIsAdapter(application.getIsAdapter());
|
||||
ModelAndView modelAndView=null;
|
||||
|
||||
Accounts appUser=getAppAccounts(formBasedDetails);
|
||||
Accounts appUser=getAccounts(formBasedDetails);
|
||||
|
||||
_logger.debug("Accounts "+appUser);
|
||||
if(appUser == null){
|
||||
|
||||
@ -4,7 +4,7 @@ import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.crypto.DigestUtils;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
public class FormBasedDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
@ -23,7 +23,7 @@ public class FormBasedDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/formbased_sso_submint");
|
||||
FormBasedDetails details=(FormBasedDetails)app;
|
||||
AppsFormBasedDetails details=(AppsFormBasedDetails)app;
|
||||
|
||||
modelAndView.addObject("username", details.getAppUser().getRelatedUsername());
|
||||
modelAndView.addObject("password", details.getAppUser().getRelatedPassword());
|
||||
|
||||
@ -3,7 +3,7 @@ package org.maxkey.authz.formbased.endpoint.adapter;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
public class FormBasedNetease163EmailAdapter extends AbstractAuthorizeAdapter {
|
||||
@ -22,7 +22,7 @@ public class FormBasedNetease163EmailAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/formbased_netease_163email_sso_submint");
|
||||
FormBasedDetails details=(FormBasedDetails)app;
|
||||
AppsFormBasedDetails details=(AppsFormBasedDetails)app;
|
||||
modelAndView.addObject("username", details.getAppUser().getRelatedUsername().substring(details.getAppUser().getRelatedUsername().indexOf("@")));
|
||||
modelAndView.addObject("email", details.getAppUser().getRelatedUsername());
|
||||
modelAndView.addObject("password", details.getAppUser().getRelatedPassword());
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.Date;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.crypto.DigestUtils;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
public class FormBasedNeteaseNoteYoudaoAdapter extends AbstractAuthorizeAdapter {
|
||||
@ -24,7 +24,7 @@ public class FormBasedNeteaseNoteYoudaoAdapter extends AbstractAuthorizeAdapter
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/formbased_netease_noteyoudao_sso_submint");
|
||||
FormBasedDetails details=(FormBasedDetails)app;
|
||||
AppsFormBasedDetails details=(AppsFormBasedDetails)app;
|
||||
modelAndView.addObject("username", details.getAppUser().getRelatedUsername());
|
||||
modelAndView.addObject("password", DigestUtils.md5Hex(details.getAppUser().getRelatedPassword()));
|
||||
modelAndView.addObject("currentTime", (new Date()).getTime());
|
||||
|
||||
@ -4,7 +4,7 @@ import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.crypto.DigestUtils;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.FormBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsFormBasedDetails;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@ -24,7 +24,7 @@ public class FormBasedRedirectAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public ModelAndView authorize(UserInfo userInfo, Object app, String data,ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("authorize/formbased_redirect_submint");
|
||||
FormBasedDetails details=(FormBasedDetails)app;
|
||||
AppsFormBasedDetails details=(AppsFormBasedDetails)app;
|
||||
|
||||
modelAndView.addObject("id", details.getId());
|
||||
modelAndView.addObject("action", details.getRedirectUri());
|
||||
|
||||
@ -10,11 +10,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
@ -28,7 +23,6 @@
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
|
||||
@ -3,7 +3,6 @@ connection.arguments=
|
||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
||||
connection.java.home=null
|
||||
connection.jvm.arguments=
|
||||
connection.project.dir=../..
|
||||
containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/
|
||||
derived.resources=.gradle,build
|
||||
eclipse.preferences.version=1
|
||||
|
||||
@ -12,9 +12,9 @@ import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.authz.ltpa.endpoint.adapter.LtpaDefaultAdapter;
|
||||
import org.maxkey.config.ApplicationConfig;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.dao.service.TokenBasedDetailsService;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.TokenBasedDetails;
|
||||
import org.maxkey.dao.service.AppsTokenBasedDetailsService;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.AppsTokenBasedDetails;
|
||||
import org.maxkey.util.Instance;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@ -34,7 +34,7 @@ public class LtpaAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
|
||||
final static Logger _logger = LoggerFactory.getLogger(LtpaAuthorizeEndpoint.class);
|
||||
@Autowired
|
||||
TokenBasedDetailsService tokenBasedDetailsService;
|
||||
AppsTokenBasedDetailsService tokenBasedDetailsService;
|
||||
|
||||
@Autowired
|
||||
ApplicationConfig applicationConfig;
|
||||
@ -48,10 +48,10 @@ public class LtpaAuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
@PathVariable("id") String id){
|
||||
|
||||
|
||||
TokenBasedDetails ltpaDetails=tokenBasedDetailsService.get(id);
|
||||
AppsTokenBasedDetails ltpaDetails=tokenBasedDetailsService.get(id);
|
||||
_logger.debug(""+ltpaDetails);
|
||||
String cookieValue="";
|
||||
Applications application= getApplication(id);
|
||||
Apps application= getApp(id);
|
||||
ltpaDetails.setAdapter(application.getAdapter());
|
||||
ltpaDetails.setIsAdapter(application.getIsAdapter());
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.HashMap;
|
||||
import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter;
|
||||
import org.maxkey.constants.BOOLEAN;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.TokenBasedDetails;
|
||||
import org.maxkey.domain.apps.AppsTokenBasedDetails;
|
||||
import org.maxkey.util.DateUtils;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.util.StringGenerator;
|
||||
@ -18,7 +18,7 @@ public class LtpaDefaultAdapter extends AbstractAuthorizeAdapter {
|
||||
final static Logger _logger = LoggerFactory.getLogger(LtpaDefaultAdapter.class);
|
||||
@Override
|
||||
public String generateInfo(UserInfo userInfo,Object app) {
|
||||
TokenBasedDetails details=(TokenBasedDetails)app;
|
||||
AppsTokenBasedDetails details=(AppsTokenBasedDetails)app;
|
||||
HashMap<String,String> beanMap=new HashMap<String,String>();
|
||||
|
||||
beanMap.put("randomId",(new StringGenerator()).uuidGenerate());
|
||||
|
||||
@ -67,22 +67,22 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg
|
||||
private static final String CLIENT_FIELDS = "client_secret, " + CLIENT_FIELDS_FOR_UPDATE;
|
||||
|
||||
private static final String BASE_FIND_STATEMENT = "select client_id, " + CLIENT_FIELDS
|
||||
+ " from oauth_client_details";
|
||||
+ " from apps_oauth_client_details";
|
||||
|
||||
private static final String DEFAULT_FIND_STATEMENT = BASE_FIND_STATEMENT + " order by client_id";
|
||||
|
||||
private static final String DEFAULT_SELECT_STATEMENT = BASE_FIND_STATEMENT + " where client_id = ?";
|
||||
|
||||
private static final String DEFAULT_INSERT_STATEMENT = "insert into oauth_client_details (" + CLIENT_FIELDS
|
||||
private static final String DEFAULT_INSERT_STATEMENT = "insert into apps_oauth_client_details (" + CLIENT_FIELDS
|
||||
+ ", client_id) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
private static final String DEFAULT_UPDATE_STATEMENT = "update oauth_client_details " + "set "
|
||||
private static final String DEFAULT_UPDATE_STATEMENT = "update apps_oauth_client_details " + "set "
|
||||
+ CLIENT_FIELDS_FOR_UPDATE.replaceAll(", ", "=?, ") + "=? where client_id = ?";
|
||||
|
||||
private static final String DEFAULT_UPDATE_SECRET_STATEMENT = "update oauth_client_details "
|
||||
private static final String DEFAULT_UPDATE_SECRET_STATEMENT = "update apps_oauth_client_details "
|
||||
+ "set client_secret = ? where client_id = ?";
|
||||
|
||||
private static final String DEFAULT_DELETE_STATEMENT = "delete from oauth_client_details where client_id = ?";
|
||||
private static final String DEFAULT_DELETE_STATEMENT = "delete from apps_oauth_client_details where client_id = ?";
|
||||
|
||||
private RowMapper<ClientDetails> rowMapper = new ClientDetailsRowMapper();
|
||||
|
||||
|
||||
@ -17,10 +17,10 @@ import org.maxkey.crypto.jwt.encryption.service.JwtEncryptionAndDecryptionServic
|
||||
import org.maxkey.crypto.jwt.encryption.service.impl.RecipientJwtEncryptionAndDecryptionServiceBuilder;
|
||||
import org.maxkey.crypto.jwt.signer.service.JwtSigningAndValidationService;
|
||||
import org.maxkey.crypto.jwt.signer.service.impl.SymmetricSigningAndValidationServiceBuilder;
|
||||
import org.maxkey.dao.service.ApplicationsService;
|
||||
import org.maxkey.dao.service.AppsService;
|
||||
import org.maxkey.dao.service.UserInfoService;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.maxkey.domain.apps.Apps;
|
||||
import org.maxkey.domain.apps.oauth2.provider.ClientDetails;
|
||||
import org.maxkey.util.Instance;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
@ -65,7 +65,7 @@ public class UserInfoEndpoint {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applicationsService")
|
||||
protected ApplicationsService applicationsService;
|
||||
protected AppsService applicationsService;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("jwtSignerValidationService")
|
||||
@ -100,7 +100,7 @@ public class UserInfoEndpoint {
|
||||
|
||||
String client_id= oAuth2Authentication.getOAuth2Request().getClientId();
|
||||
UserInfo userInfo=queryUserInfo(principal);
|
||||
Applications app=applicationsService.get(client_id);
|
||||
Apps app=applicationsService.get(client_id);
|
||||
|
||||
String userJson="";
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.maxkey.authz.saml.common.AuthnRequestInfo;
|
||||
import org.maxkey.domain.apps.SAML20Details;
|
||||
import org.maxkey.domain.apps.AppsSAML20Details;
|
||||
import org.opensaml.common.SignableSAMLObject;
|
||||
import org.opensaml.common.binding.SAMLMessageContext;
|
||||
import org.opensaml.saml2.metadata.Endpoint;
|
||||
@ -34,7 +34,7 @@ public interface BindingAdapter {
|
||||
|
||||
public void setRelayState(String relayState);
|
||||
|
||||
public SAML20Details getSaml20Details();
|
||||
public AppsSAML20Details getSaml20Details();
|
||||
|
||||
public AuthnRequestInfo getAuthnRequestInfo();
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import java.security.KeyStore;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.maxkey.crypto.keystore.KeyStoreLoader;
|
||||
import org.maxkey.domain.apps.SAML20Details;
|
||||
import org.maxkey.domain.apps.AppsSAML20Details;
|
||||
import org.opensaml.common.binding.SAMLMessageContext;
|
||||
import org.opensaml.ws.message.decoder.MessageDecodingException;
|
||||
import org.opensaml.ws.security.SecurityPolicyResolver;
|
||||
@ -29,9 +29,9 @@ public interface ExtractBindingAdapter {
|
||||
|
||||
public void buildSecurityPolicyResolver(KeyStore trustKeyStore);
|
||||
|
||||
public void setSaml20Detail(SAML20Details saml20Detail);
|
||||
public void setSaml20Detail(AppsSAML20Details saml20Detail);
|
||||
|
||||
public SAML20Details getSaml20Detail();
|
||||
public AppsSAML20Details getSaml20Detail();
|
||||
|
||||
public KeyStoreLoader getKeyStoreLoader();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user