mirror of
https://github.com/sasjs/server.git
synced 2026-01-05 22:00:05 +00:00
chore(merge): Merge branch 'master' into authentication-with-jwt
This commit is contained in:
27
api/src/model/Client.ts
Normal file
27
api/src/model/Client.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import mongoose, { Schema } from 'mongoose'
|
||||
|
||||
export interface ClientPayload {
|
||||
/**
|
||||
* Client ID
|
||||
* @example "someFormattedClientID1234"
|
||||
*/
|
||||
clientId: string
|
||||
/**
|
||||
* Client Secret
|
||||
* @example "someRandomCryptoString"
|
||||
*/
|
||||
clientSecret: string
|
||||
}
|
||||
|
||||
const ClientSchema = new Schema<ClientPayload>({
|
||||
clientId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
clientSecret: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
export default mongoose.model('Client', ClientSchema)
|
||||
Reference in New Issue
Block a user