This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/server/api/oauth2/index.js

28 lines
599 B
JavaScript

import middleware from './middleware'
import controller from './controller'
import decision from './controller/decision'
import response from './response'
import error from './error'
import model from './model'
class OAuth2Provider {
constructor () {
this.bearer = middleware
this.controller = controller
this.decision = decision
this.response = response
this.error = error.OAuth2Error
this.model = model
}
express () {
return (req, res, next) => {
console.debug('attached')
req.oauth2 = this
next()
}
}
}
module.exports = OAuth2Provider