mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
192ebb1739
refs #9178 - move tests as well
16 lines
518 B
JavaScript
16 lines
518 B
JavaScript
var ClientPasswordStrategy = require('passport-oauth2-client-password').Strategy,
|
|
BearerStrategy = require('passport-http-bearer').Strategy,
|
|
passport = require('passport'),
|
|
authStrategies = require('./auth-strategies');
|
|
|
|
/**
|
|
* auth types:
|
|
* - password: local login
|
|
*/
|
|
exports.init = function initPassport() {
|
|
passport.use(new ClientPasswordStrategy(authStrategies.clientPasswordStrategy));
|
|
passport.use(new BearerStrategy(authStrategies.bearerStrategy));
|
|
|
|
return passport.initialize();
|
|
};
|