Renames VisitorAuthenticate() to RegisterAuthenticate()

This commit is contained in:
smavros 2019-08-15 14:52:19 +02:00
parent 426b834ea5
commit c2429394ed
10 changed files with 10 additions and 10 deletions

View file

@ -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))

View file

@ -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))

View file

@ -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))

View file

@ -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))

View file

@ -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))

View file

@ -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))

View file

@ -21,7 +21,7 @@ type tokenClaims struct {
jwt.StandardClaims
}
func VisitorAuthenticate(r *gin.RouterGroup) {
func RegisterAuthenticate(r *gin.RouterGroup) {
r.POST("", authenticate)
}

View file

@ -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"))

View file

@ -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))

View file

@ -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))