mirror of
https://github.com/strapi/strapi.git
synced 2025-07-24 01:18:17 +00:00
26 lines
793 B
JavaScript
26 lines
793 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* @typedef {{authenticated: boolean, error?: string, credentials?: Record<any, any>}} AuthenticateResponse
|
|
* @typedef {(ctx: Record<any, any>) => AuthenticateResponse | Promise<AuthenticateResponse>} AuthenticateFunction
|
|
* @typedef {{strategy: AuthStrategy, credentials?: Record<any, any>}} VerifyInputAuth
|
|
* @typedef {{scope: string, [key: any]: any}} VerifyInputConfig
|
|
* @typedef {(auth: VerifyInputAuth, config: VerifyInputConfig) => void | Promise<void>} VerifyFunction
|
|
*/
|
|
|
|
/**
|
|
* @typedef AuthStrategy
|
|
*
|
|
* @property {string} name
|
|
* @property {AuthenticateFunction} authenticate
|
|
* @property {VerifyFunction} [verify]
|
|
*/
|
|
|
|
/**
|
|
* @type {Record<string, AuthStrategy>}
|
|
*/
|
|
module.exports = {
|
|
admin: require('./admin'),
|
|
'api-token': require('./api-token'),
|
|
};
|