mirror of
https://github.com/OpenBankProject/API-Explorer-II.git
synced 2026-02-06 10:47:04 +00:00
add current user info to /api/status page
This commit is contained in:
parent
ef8d637daf
commit
779812a020
@ -33,6 +33,7 @@ import OauthAccessTokenMiddleware from '../middlewares/OauthAccessTokenMiddlewar
|
||||
@Service()
|
||||
@Controller()
|
||||
@UseBefore(OauthAccessTokenMiddleware)
|
||||
// This controller seems to not do anything at all
|
||||
export default class CallbackController {
|
||||
@Get('/callback')
|
||||
callback(@Req() request: Request, @Res() response: Response): Response {
|
||||
|
||||
@ -55,6 +55,7 @@ export class StatusController {
|
||||
): Response {
|
||||
const oauthConfig = session['clientConfig']
|
||||
const version = this.obpClientService.getOBPVersion()
|
||||
const currentUser = await this.obpClientService.get(`/obp/${version}/users/current`, oauthConfig)
|
||||
const apiVersions = await this.checkApiVersions(oauthConfig, version)
|
||||
const messageDocs = await this.checkMessagDocs(oauthConfig, version)
|
||||
const resourceDocs = await this.checkResourceDocs(oauthConfig, version)
|
||||
@ -62,7 +63,8 @@ export class StatusController {
|
||||
status: apiVersions && messageDocs && resourceDocs,
|
||||
apiVersions,
|
||||
messageDocs,
|
||||
resourceDocs
|
||||
resourceDocs,
|
||||
currentUser
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user