2

I'm trying to implement two factor authentication via spring oauth2.

Details:

  • Server side - REST
  • UI - angular

Oauth2 settings:

  • few in memory clients, one for ui
  • "grant_type" is password
  • token default (bearer)
  • path to token default (/oauth/token)

How do I see it:

1) I'm getting token via user/client details with role PRE_AUTH

2) Listen success authentication and send sms to authenticated user

3) Based on token and code from sms, generate new token or enhance old with 2FA role.


So, I have problem with 3-rd item. I can't get access to oauth/token with Authentication bearer...

Could I enhance token and what about refresh_token will it enhance too?

Where I should add filter for generate/enhance token?

Maybe you have other ideas how to implement it? I would be glad to hear them.

0 Answers0