Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
6ec27cd1
Commit
6ec27cd1
authored
May 14, 2022
by
KingRainbow44
Browse files
Update routes
parent
04d9613f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/http/dispatch/DispatchHandler.java
View file @
6ec27cd1
...
@@ -27,9 +27,12 @@ public final class DispatchHandler implements Router {
...
@@ -27,9 +27,12 @@ public final class DispatchHandler implements Router {
// External login (from other clients).
// External login (from other clients).
express
.
get
(
"/authentication/type"
,
(
request
,
response
)
->
response
.
send
(
Grasscutter
.
getAuthenticationSystem
().
getClass
().
getSimpleName
()));
express
.
get
(
"/authentication/type"
,
(
request
,
response
)
->
response
.
send
(
Grasscutter
.
getAuthenticationSystem
().
getClass
().
getSimpleName
()));
express
.
post
(
"/authentication/login"
,
(
request
,
response
)
->
response
.
status
(
500
).
send
(
"{\"notice\":\"This API is deprecated.\"}"
));
express
.
post
(
"/authentication/login"
,
(
request
,
response
)
->
Grasscutter
.
getAuthenticationSystem
().
getExternalAuthenticator
()
express
.
post
(
"/authentication/register"
,
(
request
,
response
)
->
response
.
status
(
500
).
send
(
"{\"notice\":\"This API is deprecated.\"}"
));
.
handleLogin
(
AuthenticationSystem
.
fromExternalRequest
(
request
,
response
)));
express
.
post
(
"/authentication/change_password"
,
(
request
,
response
)
->
response
.
status
(
500
).
send
(
"{\"notice\":\"This API is deprecated.\"}"
));
express
.
post
(
"/authentication/register"
,
(
request
,
response
)
->
Grasscutter
.
getAuthenticationSystem
().
getExternalAuthenticator
()
.
handleAccountCreation
(
AuthenticationSystem
.
fromExternalRequest
(
request
,
response
)));
express
.
post
(
"/authentication/change_password"
,
(
request
,
response
)
->
Grasscutter
.
getAuthenticationSystem
().
getExternalAuthenticator
()
.
handlePasswordReset
(
AuthenticationSystem
.
fromExternalRequest
(
request
,
response
)));
}
}
/**
/**
...
...
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