Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Game Server Go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Akamu
Game Server Go
Commits
a5261656
Commit
a5261656
authored
Feb 03, 2020
by
Julien Schröter
Committed by
Julien Schröter
Feb 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare JWT and email verification link to release
parent
24d61265
Pipeline
#1461
passed with stage
in 4 minutes and 44 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
assets/email/registrationVerification.tmpl
assets/email/registrationVerification.tmpl
+1
-1
setup/setup.go
setup/setup.go
+3
-4
No files found.
assets/email/registrationVerification.tmpl
View file @
a5261656
...
...
@@ -12,7 +12,7 @@
account, go ahead and click the following link:
</p>
<p>
<a href="https://
dev.akamu.de/api/verify?token={{.Token}}">https://dev.akamu.de/api
/verify?token={{.Token}}</a>
<a href="https://
akamu.de/api/v2/verify?token={{.Token}}">https://akamu.de/api/v2
/verify?token={{.Token}}</a>
</p>
<p>Note that the link is only valid for 24 hours.</p>
...
...
setup/setup.go
View file @
a5261656
...
...
@@ -117,7 +117,7 @@ func getRoot(ctx *gin.Context) {
}
func
SetupRoutes
(
courseRepository
course
.
CourseQuery
,
flashcardRepository
flashcard
.
FlashcardQuery
,
subjectRepository
subject
.
SubjectQuery
,
titleRepository
title
.
TitleQuery
,
traininglistRepository
traininglist
.
TrainingListQuery
,
userRepository
user
.
UserQuery
,
poolRepository
pool
.
PoolQuery
,
friendRepository
friend
.
FriendQuery
,
avatarRepository
avatar
.
AvatarQuery
,
duelRepository
duel
.
DuelQuery
,
refreshjwtRepository
refreshjwt
.
RefreshJWTQuery
,
resourceServerConfig
*
config
.
ResourceServer
,
settings
*
setting
.
Settings
,
smtpTransport
*
sendmail
.
Transport
,
jwtSecret
...
string
)
*
gin
.
Engine
{
//
gin.SetMode(gin.ReleaseMode)
gin
.
SetMode
(
gin
.
ReleaseMode
)
router
:=
gin
.
Default
()
router
.
GET
(
"/"
,
getRoot
)
...
...
@@ -133,9 +133,8 @@ func SetupRoutes(courseRepository course.CourseQuery, flashcardRepository flashc
// The jwt can be refreshed until 2 years after the last signin. After this duration,
// the user has to log in again with his username and password.
MaxRefresh
:
time
.
Hour
*
24
*
365
*
2
,
// Token has to be refreshed every 15 minutes. Niklas requested a longer timeout for
// development. For release, change the timout back to 15 minutes!
Timeout
:
time
.
Minute
*
60
*
24
*
30
,
// Token has to be refreshed every 15 minutes.
Timeout
:
time
.
Minute
*
15
,
Authenticator
:
authenticate
(
userRepository
,
refreshjwtRepository
),
Unauthorized
:
func
(
c
*
gin
.
Context
,
code
int
,
message
string
,
err
error
)
{
switch
err
{
...
...
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