Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
7ed9fdd3
Commit
7ed9fdd3
authored
12 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Added URLs in form of /auth/* for LoginController to conform with the
API specification.
parent
cd5a767b
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/LoginController.java
+3
-3
3 additions, 3 deletions
src/main/java/de/thm/arsnova/controller/LoginController.java
with
3 additions
and
3 deletions
src/main/java/de/thm/arsnova/controller/LoginController.java
+
3
−
3
View file @
7ed9fdd3
...
@@ -76,7 +76,7 @@ public class LoginController extends AbstractController {
...
@@ -76,7 +76,7 @@ public class LoginController extends AbstractController {
public
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
LoginController
.
class
);
public
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
LoginController
.
class
);
@RequestMapping
(
value
=
"/doLogin"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
{
"/auth/login"
,
"/doLogin"
}
,
method
=
RequestMethod
.
GET
)
public
final
View
doLogin
(
public
final
View
doLogin
(
@RequestParam
(
"type"
)
final
String
type
,
@RequestParam
(
"type"
)
final
String
type
,
@RequestParam
(
value
=
"user"
,
required
=
false
)
final
String
guestName
,
@RequestParam
(
value
=
"user"
,
required
=
false
)
final
String
guestName
,
...
@@ -137,13 +137,13 @@ public class LoginController extends AbstractController {
...
@@ -137,13 +137,13 @@ public class LoginController extends AbstractController {
return
null
;
return
null
;
}
}
@RequestMapping
(
value
=
"/whoami"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
{
"/auth/"
,
"/whoami"
}
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
final
User
whoami
()
{
public
final
User
whoami
()
{
return
userService
.
getCurrentUser
();
return
userService
.
getCurrentUser
();
}
}
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
{
"/auth/logout"
,
"/logout"
}
,
method
=
RequestMethod
.
GET
)
public
final
View
doLogout
(
final
HttpServletRequest
request
)
{
public
final
View
doLogout
(
final
HttpServletRequest
request
)
{
Authentication
auth
=
SecurityContextHolder
.
getContext
().
getAuthentication
();
Authentication
auth
=
SecurityContextHolder
.
getContext
().
getAuthentication
();
request
.
getSession
().
invalidate
();
request
.
getSession
().
invalidate
();
...
...
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