Skip to content

Commit 779812a

Browse files
committed
add current user info to /api/status page
1 parent ef8d637 commit 779812a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

server/controllers/CallbackController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import OauthAccessTokenMiddleware from '../middlewares/OauthAccessTokenMiddlewar
3333
@Service()
3434
@Controller()
3535
@UseBefore(OauthAccessTokenMiddleware)
36+
// This controller seems to not do anything at all
3637
export default class CallbackController {
3738
@Get('/callback')
3839
callback(@Req() request: Request, @Res() response: Response): Response {

server/controllers/StatusController.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,16 @@ export class StatusController {
5555
): Response {
5656
const oauthConfig = session['clientConfig']
5757
const version = this.obpClientService.getOBPVersion()
58+
const currentUser = await this.obpClientService.get(`/obp/${version}/users/current`, oauthConfig)
5859
const apiVersions = await this.checkApiVersions(oauthConfig, version)
5960
const messageDocs = await this.checkMessagDocs(oauthConfig, version)
6061
const resourceDocs = await this.checkResourceDocs(oauthConfig, version)
6162
return response.json({
6263
status: apiVersions && messageDocs && resourceDocs,
6364
apiVersions,
6465
messageDocs,
65-
resourceDocs
66+
resourceDocs,
67+
currentUser
6668
})
6769
}
6870

0 commit comments

Comments
 (0)