Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Genesys Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Genesys PGR
Genesys Backend
Commits
3a60c816
Commit
3a60c816
authored
7 years ago
by
Matija Obreza
Browse files
Options
Downloads
Patches
Plain Diff
New verification tokens live for 48 hours
parent
378cd077
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/genesys2/server/service/impl/TokenVerificationServiceImpl.java
+6
-8
6 additions, 8 deletions
...ys2/server/service/impl/TokenVerificationServiceImpl.java
with
6 additions
and
8 deletions
src/main/java/org/genesys2/server/service/impl/TokenVerificationServiceImpl.java
+
6
−
8
View file @
3a60c816
...
...
@@ -16,6 +16,9 @@
package
org.genesys2.server.service.impl
;
import
java.util.Calendar
;
import
java.util.Date
;
import
org.apache.commons.lang.RandomStringUtils
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
...
...
@@ -24,21 +27,17 @@ import org.genesys2.server.persistence.domain.VerificationTokenRepository;
import
org.genesys2.server.service.JPATokenStoreCleanup
;
import
org.genesys2.server.service.TokenVerificationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.i18n.LocaleContextHolder
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Calendar
;
import
java.util.Date
;
@Service
@Transactional
(
readOnly
=
true
)
public
class
TokenVerificationServiceImpl
implements
TokenVerificationService
,
JPATokenStoreCleanup
{
private
static
final
Log
LOG
=
LogFactory
.
getLog
(
TokenVerificationServiceImpl
.
class
);
private
static
final
int
HOURS_UNTIL_INVALID
=
4
;
private
static
final
int
HOURS_UNTIL_INVALID
=
4
8
;
@Autowired
private
VerificationTokenRepository
verificationTokenRepository
;
...
...
@@ -61,8 +60,8 @@ public class TokenVerificationServiceImpl implements TokenVerificationService, J
return
token
;
}
@Override
@Transactional
@Override
@Transactional
public
void
cancel
(
String
tokenUuid
)
throws
NoSuchVerificationTokenException
{
final
VerificationToken
verificationToken
=
verificationTokenRepository
.
findByUuid
(
tokenUuid
);
if
(
verificationToken
==
null
)
{
...
...
@@ -99,7 +98,6 @@ public class TokenVerificationServiceImpl implements TokenVerificationService, J
return
verificationToken
;
}
/**
* Cleanup executed every 10 minutes
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment