mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
Renames VisitorAuthenticate() to RegisterAuthenticate()
This commit is contained in:
parent
426b834ea5
commit
c2429394ed
10 changed files with 10 additions and 10 deletions
|
@ -29,7 +29,7 @@ func TestEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ func TestSignalEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func TestScenarioEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func TestSignalEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestSimulationModelEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func TestSimulatorEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ type tokenClaims struct {
|
|||
jwt.StandardClaims
|
||||
}
|
||||
|
||||
func VisitorAuthenticate(r *gin.RouterGroup) {
|
||||
func RegisterAuthenticate(r *gin.RouterGroup) {
|
||||
r.POST("", authenticate)
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ func TestUserEndpoints(t *testing.T) {
|
|||
router := gin.Default()
|
||||
api := router.Group("/api")
|
||||
|
||||
VisitorAuthenticate(api.Group("/authenticate"))
|
||||
RegisterAuthenticate(api.Group("/authenticate"))
|
||||
api.Use(Authentication(true))
|
||||
RegisterUserEndpoints(api.Group("/users"))
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestWidgetEndpoints(t *testing.T) {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
2
start.go
2
start.go
|
@ -50,7 +50,7 @@ func main() {
|
|||
|
||||
// All endpoints require authentication except when someone wants to
|
||||
// login (POST /authenticate)
|
||||
user.VisitorAuthenticate(api.Group("/authenticate"))
|
||||
user.RegisterAuthenticate(api.Group("/authenticate"))
|
||||
|
||||
api.Use(user.Authentication(true))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue