Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
s_guodong
gjjs-bd-common
Commits
d3d9ce92
Commit
d3d9ce92
authored
Jul 06, 2023
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交剩余参数的处理
parent
056521d9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
5 deletions
+80
-5
LoginConstants.java
...s/src/main/java/com/ceb/gjjs/mda/util/LoginConstants.java
+4
-0
LoginData.java
...siness/src/main/java/com/ceb/gjjs/mda/util/LoginData.java
+10
-0
AuthInterceptor.java
...s/src/main/java/com/ceb/gjjs/mda/web/AuthInterceptor.java
+1
-1
AuthorizationRequestFilter.java
...java/com/ceb/gjjs/mda/web/AuthorizationRequestFilter.java
+18
-3
IAuthInfo.java
...c/main/java/com/brilliance/mda/runtime/mda/IAuthInfo.java
+10
-0
BDAuthInfo.java
...c/main/java/com/brilliance/mda/support/td/BDAuthInfo.java
+37
-1
No files found.
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/util/LoginConstants.java
View file @
d3d9ce92
...
...
@@ -25,5 +25,9 @@ public class LoginConstants {
public
static
final
String
__terminalType
=
"__terminalType"
;
public
static
final
String
algorithm
=
"algorithm"
;
public
static
final
String
CERT
=
"CERT"
;
}
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/util/LoginData.java
View file @
d3d9ce92
...
...
@@ -14,6 +14,16 @@ public class LoginData {
return
MdaEnv
.
getAuthInfo
().
getErrorText
();
else
if
(
LoginConstants
.
ncid
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getPtyInr
();
else
if
(
LoginConstants
.
CN
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getCn
();
else
if
(
LoginConstants
.
__terminalType
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getTerminalType
();
else
if
(
LoginConstants
.
algorithm
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getAlgorithm
();
else
if
(
LoginConstants
.
CERT
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getCert
();
else
if
(
LoginConstants
.
needSign
.
equals
(
param
))
return
MdaEnv
.
getAuthInfo
().
getNeedSign
();
return
null
;
}
}
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/web/AuthInterceptor.java
View file @
d3d9ce92
...
...
@@ -50,7 +50,7 @@ public class AuthInterceptor implements HandlerInterceptor {
if
(
authInfo
==
null
)
{
String
cid
=
headMap
.
get
(
LoginConstants
.
cid
).
toString
();
String
ncid
=
headMap
.
get
(
LoginConstants
.
ncid
).
toString
();
BDAuthInfo
tdAuthInfo
=
new
BDAuthInfo
(
cid
,
ncid
,
""
);
BDAuthInfo
tdAuthInfo
=
new
BDAuthInfo
(
cid
,
ncid
,
""
,
null
,
null
,
null
,
null
,
null
);
authInfo
=
tdAuthInfo
;
authInfoICache
.
store
(
tokenKey
,
authInfo
);
//构造authInfo,本该在登录里面做
...
...
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/web/AuthorizationRequestFilter.java
View file @
d3d9ce92
...
...
@@ -65,6 +65,11 @@ public class AuthorizationRequestFilter implements ContainerRequestFilter {
String
userId
=
usrList
.
get
(
0
).
getInr
();
//网银编号
String
ncid
=
request
.
getHeaderString
(
LoginConstants
.
ncid
);
String
CN
=
request
.
getHeaderString
(
LoginConstants
.
CN
);
String
needSign
=
request
.
getHeaderString
(
LoginConstants
.
needSign
);
String
__terminalType
=
request
.
getHeaderString
(
LoginConstants
.
__terminalType
);
String
algorithm
=
request
.
getHeaderString
(
LoginConstants
.
algorithm
);
String
CERT
=
request
.
getHeaderString
(
LoginConstants
.
CERT
);
//errorText
String
errorText
=
request
.
getHeaderString
(
LoginConstants
.
errorText
);
...
...
@@ -72,6 +77,11 @@ public class AuthorizationRequestFilter implements ContainerRequestFilter {
headMap
.
put
(
LoginConstants
.
usrinr
,
userId
);
headMap
.
put
(
LoginConstants
.
ncid
,
ncid
);
headMap
.
put
(
LoginConstants
.
errorText
,
errorText
);
headMap
.
put
(
LoginConstants
.
CN
,
CN
);
headMap
.
put
(
LoginConstants
.
needSign
,
needSign
);
headMap
.
put
(
LoginConstants
.
__terminalType
,
__terminalType
);
headMap
.
put
(
LoginConstants
.
algorithm
,
algorithm
);
headMap
.
put
(
LoginConstants
.
CERT
,
CERT
);
String
token
=
getTokenKey
(
request
);
//目前采用自动登录模式认证
...
...
@@ -98,10 +108,15 @@ public class AuthorizationRequestFilter implements ContainerRequestFilter {
synchronized
(
authInfoICache
)
{
authInfo
=
authInfoICache
.
get
(
tokenKey
);
if
(
authInfo
==
null
)
{
String
usrinr
=
headMap
.
get
(
LoginConstants
.
usrinr
).
toString
();
String
ptyinr
=
headMap
.
get
(
LoginConstants
.
ncid
).
toString
();
String
usrinr
=
headMap
.
get
(
LoginConstants
.
usrinr
)
==
null
?
""
:
headMap
.
get
(
LoginConstants
.
usrinr
)
.
toString
();
String
ptyinr
=
headMap
.
get
(
LoginConstants
.
ptyinr
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
ncid
).
toString
();
String
errorText
=
headMap
.
get
(
LoginConstants
.
errorText
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
errorText
).
toString
();
BDAuthInfo
tdAuthInfo
=
new
BDAuthInfo
(
usrinr
,
ptyinr
,
errorText
);
String
CN
=
headMap
.
get
(
LoginConstants
.
CN
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
CN
).
toString
();
String
needSign
=
headMap
.
get
(
LoginConstants
.
needSign
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
needSign
).
toString
();
String
__terminalType
=
headMap
.
get
(
LoginConstants
.
__terminalType
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
__terminalType
).
toString
();
String
algorithm
=
headMap
.
get
(
LoginConstants
.
algorithm
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
algorithm
).
toString
();
String
CERT
=
headMap
.
get
(
LoginConstants
.
CERT
)==
null
?
""
:
headMap
.
get
(
LoginConstants
.
CERT
).
toString
();
BDAuthInfo
tdAuthInfo
=
new
BDAuthInfo
(
usrinr
,
ptyinr
,
errorText
,
__terminalType
,
needSign
,
CN
,
algorithm
,
CERT
);
authInfo
=
tdAuthInfo
;
authInfoICache
.
store
(
tokenKey
,
authInfo
);
//构造authInfo,本该在登录里面做
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/IAuthInfo.java
View file @
d3d9ce92
...
...
@@ -7,6 +7,16 @@ public interface IAuthInfo {
//获取当前用户的机构ID
String
getPtyInr
();
String
getTerminalType
();
String
getNeedSign
();
String
getCn
();
String
getAlgorithm
();
String
getCert
();
//获取errorText
String
getErrorText
();
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/support/td/BDAuthInfo.java
View file @
d3d9ce92
...
...
@@ -4,22 +4,33 @@ import com.brilliance.mda.runtime.mda.IAuthInfo;
import
com.brilliance.mda.runtime.mda.IStream
;
import
com.brilliance.mda.runtime.mda.impl.StreamImpl
;
import
java.security.cert.X509Certificate
;
import
java.util.List
;
public
class
BDAuthInfo
implements
IAuthInfo
{
private
String
usrInr
;
private
String
ptyInr
;
private
String
errorText
;
private
String
terminalType
;
private
String
needSign
;
private
String
cn
;
private
String
algorithm
;
private
String
cert
;
private
IStream
sysStream
;
private
IStream
ddsStream
;
private
IStream
keepAuthInfo
;
public
BDAuthInfo
(){}
public
BDAuthInfo
(
String
usrInr
,
String
ptyInr
,
String
errorText
)
{
public
BDAuthInfo
(
String
usrInr
,
String
ptyInr
,
String
errorText
,
String
terminalType
,
String
needSign
,
String
cn
,
String
algorithm
,
String
cert
)
{
this
.
usrInr
=
usrInr
;
this
.
ptyInr
=
ptyInr
;
this
.
errorText
=
errorText
;
this
.
terminalType
=
terminalType
;
this
.
needSign
=
needSign
;
this
.
cn
=
cn
;
this
.
algorithm
=
algorithm
;
this
.
cert
=
cert
;
sysStream
=
new
StreamImpl
();
ddsStream
=
new
StreamImpl
();
keepAuthInfo
=
new
StreamImpl
();
...
...
@@ -36,6 +47,31 @@ public class BDAuthInfo implements IAuthInfo {
}
@Override
public
String
getTerminalType
()
{
return
terminalType
;
}
@Override
public
String
getNeedSign
()
{
return
needSign
;
}
@Override
public
String
getCn
()
{
return
cn
;
}
@Override
public
String
getAlgorithm
()
{
return
algorithm
;
}
@Override
public
String
getCert
()
{
return
cert
;
}
@Override
public
String
getErrorText
()
{
return
null
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment