mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-12 22:59:08 +00:00
FEAT: map permission to identity provider
This commit is contained in:
@@ -43,7 +43,7 @@ export class IdentityProviderController {
|
||||
this.logger.info('/openid - addIdentityProvider');
|
||||
|
||||
const metadata = PackTheMetadata({
|
||||
customer_id: user.customer_id,
|
||||
...user,
|
||||
language,
|
||||
});
|
||||
|
||||
@@ -66,24 +66,26 @@ export class IdentityProviderController {
|
||||
return await this.identityProviderService.getList(metadata)
|
||||
}
|
||||
|
||||
// @Get(':name')
|
||||
// @HttpCode(HttpStatus.OK)
|
||||
// @Redirect()
|
||||
// async loginIdp(@Param('name') name: string , @Req() req: Request) {
|
||||
// this.logger.info('/openid - :name');
|
||||
@Get(':id')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@Redirect()
|
||||
async loginIdp(@Param('id') id: string) {
|
||||
this.logger.info('/openid - :name');
|
||||
|
||||
// const redirectUrl = await this.openidService.loginIdp(name, req);
|
||||
// return {
|
||||
|
||||
// url: redirectUrl,
|
||||
// };
|
||||
// }
|
||||
const redirectUrl = await this.identityProviderService.loginIdentityProvider(id);
|
||||
return {
|
||||
url: redirectUrl,
|
||||
};
|
||||
}
|
||||
|
||||
// @Get('/:name/callback')
|
||||
// @HttpCode(HttpStatus.OK)
|
||||
// async callbackIdp(@Param('name') name: string, @Req() req: Request) {
|
||||
// this.logger.info('/openid - /:name/callback');
|
||||
@Get('/:name/callback')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async callbackIdp(@Param('name') name: string, @Req() req: Request) {
|
||||
this.logger.info('/openid - /:name/callback');
|
||||
|
||||
// return await this.openidService.authorizeIdp(name, req);
|
||||
// }
|
||||
return {
|
||||
name,
|
||||
params: req.params
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user