Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loginservice
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
lanmw
loginservice
Commits
5b71f719
Commit
5b71f719
authored
Apr 16, 2026
by
linxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Throw exception after License expired
parent
7510b97d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
pom.xml
pom.xml
+11
-1
LicenseMgr.java
src/main/java/com/keymobile/sso/conf/LicenseMgr.java
+1
-3
RESTAuthenticationSuccessHandler.java
.../keymobile/sso/conf/RESTAuthenticationSuccessHandler.java
+2
-1
license.dat
src/main/resources/license.dat
+0
-2
No files found.
pom.xml
View file @
5b71f719
...
...
@@ -61,7 +61,7 @@
<resource>
<directory>
src/main/resources
</directory>
<excludes>
<!-- <exclude>bootstrap.yml</exclude>--
>
<exclude>
bootstrap.yml
</exclude
>
<exclude>
license.dat
</exclude>
</excludes>
</resource>
...
...
@@ -69,6 +69,16 @@
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<configuration>
<excludes>
<exclude>
com/keymobile/sso/conf/LicenseMgr.class
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
...
...
src/main/java/com/keymobile/sso/conf/LicenseMgr.java
View file @
5b71f719
package
com
.
keymobile
.
sso
.
conf
;
import
com.keymobile.crypto.aes.AESUtil
;
import
com.keymobile.sso.logging.LogConstants
;
import
com.keymobile.sso.logging.LogManager
;
import
javax.crypto.BadPaddingException
;
import
javax.crypto.IllegalBlockSizeException
;
...
...
@@ -35,7 +33,7 @@ public class LicenseMgr {
}
public
static
void
main
(
String
[]
args
)
throws
InvalidAlgorithmParameterException
,
NoSuchPaddingException
,
IllegalBlockSizeException
,
NoSuchAlgorithmException
,
BadPaddingException
,
InvalidKeyException
{
String
licenseText
=
generate
(
"202
5-09-01
"
);
String
licenseText
=
generate
(
"202
6-05-15
"
);
System
.
out
.
println
(
"licenseText:"
+
licenseText
);
check
(
licenseText
);
}
...
...
src/main/java/com/keymobile/sso/conf/RESTAuthenticationSuccessHandler.java
View file @
5b71f719
...
...
@@ -3,6 +3,7 @@ package com.keymobile.sso.conf;
import
com.keymobile.sso.logging.LogConstants
;
import
com.keymobile.sso.logging.LogManager
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.UnavailableException
;
import
jakarta.servlet.http.HttpServletRequest
;
import
jakarta.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -43,7 +44,7 @@ public class RESTAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuc
}
LogManager
.
logInfo
(
LogConstants
.
CTX_AUDIT
,
"License checked."
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
UnavailableException
(
"License已过期, 请与我们联系。"
);
}
}
...
...
src/main/resources/license.dat
deleted
100644 → 0
View file @
7510b97d
tEAS/DJglXGdXIq0wZaHfQ==
\ No newline at end of file
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