Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
73f3c245
There was a problem fetching the pipeline summary.
Commit
73f3c245
authored
7 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Add clientId in access and refresh token models
parent
33713009
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!116
Release v1.0.0
,
!73
Workerpool feature
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/models/accessToken.js
+6
-0
6 additions, 0 deletions
src/libs/models/accessToken.js
src/libs/models/refreshToken.js
+6
-0
6 additions, 0 deletions
src/libs/models/refreshToken.js
with
12 additions
and
0 deletions
src/libs/models/accessToken.js
+
6
−
0
View file @
73f3c245
...
@@ -2,6 +2,7 @@ const mongoose = require('mongoose');
...
@@ -2,6 +2,7 @@ const mongoose = require('mongoose');
const
Schema
=
mongoose
.
Schema
;
const
Schema
=
mongoose
.
Schema
;
const
libs
=
`
${
process
.
cwd
()}
/libs`
;
const
libs
=
`
${
process
.
cwd
()}
/libs`
;
const
User
=
require
(
`
${
libs
}
/models/user`
);
const
User
=
require
(
`
${
libs
}
/models/user`
);
const
Client
=
require
(
`
${
libs
}
/models/client`
);
let
AccessToken
=
new
Schema
({
let
AccessToken
=
new
Schema
({
userId
:
{
userId
:
{
...
@@ -9,6 +10,11 @@ let AccessToken = new Schema({
...
@@ -9,6 +10,11 @@ let AccessToken = new Schema({
required
:
true
,
required
:
true
,
ref
:
'
User
'
ref
:
'
User
'
},
},
clientId
:
{
type
:
Schema
.
Types
.
ObjectId
,
required
:
true
,
ref
:
'
Client
'
},
token
:
{
token
:
{
type
:
String
,
type
:
String
,
unique
:
true
,
unique
:
true
,
...
...
This diff is collapsed.
Click to expand it.
src/libs/models/refreshToken.js
+
6
−
0
View file @
73f3c245
...
@@ -2,6 +2,7 @@ const mongoose = require('mongoose');
...
@@ -2,6 +2,7 @@ const mongoose = require('mongoose');
const
Schema
=
mongoose
.
Schema
;
const
Schema
=
mongoose
.
Schema
;
const
libs
=
`
${
process
.
cwd
()}
/libs`
;
const
libs
=
`
${
process
.
cwd
()}
/libs`
;
const
User
=
require
(
`
${
libs
}
/models/user`
);
const
User
=
require
(
`
${
libs
}
/models/user`
);
const
Client
=
require
(
`
${
libs
}
/models/client`
);
let
RefreshToken
=
new
Schema
({
let
RefreshToken
=
new
Schema
({
userId
:
{
userId
:
{
...
@@ -9,6 +10,11 @@ let RefreshToken = new Schema({
...
@@ -9,6 +10,11 @@ let RefreshToken = new Schema({
required
:
true
,
required
:
true
,
ref
:
'
User
'
ref
:
'
User
'
},
},
clientId
:
{
type
:
Schema
.
Types
.
ObjectId
,
required
:
true
,
ref
:
'
Client
'
},
token
:
{
token
:
{
type
:
String
,
type
:
String
,
unique
:
true
,
unique
:
true
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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