mirror of
https://github.com/sasjs/server.git
synced 2026-01-04 21:30:05 +00:00
feat: make access token duration configurable when creating client/secret
This commit is contained in:
@@ -11,6 +11,11 @@ export interface ClientPayload {
|
||||
* @example "someRandomCryptoString"
|
||||
*/
|
||||
clientSecret: string
|
||||
/**
|
||||
* Number of days in which access token will expire
|
||||
* @example 1
|
||||
*/
|
||||
accessTokenExpiryDays?: number
|
||||
}
|
||||
|
||||
const ClientSchema = new Schema<ClientPayload>({
|
||||
@@ -21,6 +26,10 @@ const ClientSchema = new Schema<ClientPayload>({
|
||||
clientSecret: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
accessTokenExpiryDays: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user