Noded/frontend#84 Add API for user login/registration
This commit is contained in:
28
app/routing/routers/api/v1/auth.routes.js
Normal file
28
app/routing/routers/api/v1/auth.routes.js
Normal file
@@ -0,0 +1,28 @@
|
||||
module.exports = exports = {
|
||||
|
||||
prefix: '/api/v1/auth',
|
||||
|
||||
middleware: [],
|
||||
|
||||
get: {
|
||||
'/user-info': [
|
||||
'middleware::auth:GuestOnly',
|
||||
'controller::api:v1:Auth.get_user_info',
|
||||
],
|
||||
},
|
||||
|
||||
post: {
|
||||
'/attempt': [
|
||||
'middleware::auth:GuestOnly',
|
||||
'controller::api:v1:Auth.attempt_authentication',
|
||||
],
|
||||
'/end-session': [
|
||||
'middleware::auth:UserOnly',
|
||||
'controller::api:v1:Auth.end_session',
|
||||
],
|
||||
'/register': [
|
||||
'middleware::auth:GuestOnly',
|
||||
'controller::api:v1:Auth.attempt_registration',
|
||||
],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user