mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 18:08:11 +00:00 
			
		
		
		
	 17bad93089
			
		
	
	
		17bad93089
		
	
	
	
	
		
			
			Co-authored-by: Bassel Kanso <basselkanso82@gmail.com> Co-authored-by: Ben Irvin <innerdvations@users.noreply.github.com> Co-authored-by: Simone <simone.taeggi@strapi.io>
		
			
				
	
	
		
			27 lines
		
	
	
		
			840 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			840 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'),
 | |
|   'data-transfer': require('./data-transfer'),
 | |
|   'api-token': require('./api-token'),
 | |
| };
 |