|
|
|
@ -13,7 +13,7 @@ import {
|
|
|
|
|
TokenRepository,
|
|
|
|
|
} from './types'
|
|
|
|
|
import {HTTPError} from '../../http/HTTPError'
|
|
|
|
|
import {Awaitable, HTTPStatus, left, Maybe} from '../../util'
|
|
|
|
|
import {Awaitable, HTTPStatus, Maybe, right} from '../../util'
|
|
|
|
|
import {view} from '../../http/response/ViewResponseFactory'
|
|
|
|
|
import {SecurityContext} from '../context/SecurityContext'
|
|
|
|
|
import {redirect} from '../../http/response/RedirectResponseFactory'
|
|
|
|
@ -47,7 +47,7 @@ export class OAuth2Server extends Controller {
|
|
|
|
|
Route.post('/oauth2/token')
|
|
|
|
|
.alias('@oauth2:token')
|
|
|
|
|
.parameterMiddleware<OAuth2Client>(async req =>
|
|
|
|
|
left(req.make<OAuth2Server>(OAuth2Server).getClientFromRequest(req)))
|
|
|
|
|
right(await req.make<OAuth2Server>(OAuth2Server).getClientFromRequest(req)))
|
|
|
|
|
.passingRequest()
|
|
|
|
|
.calls<OAuth2Server>(OAuth2Server, x => x.issue)
|
|
|
|
|
}
|
|
|
|
|