spring security oauth2 - /oauth/token from Controller -


i want implement oauth2 in website. have server configured. in current scenario there login page, user puts credentials in turn submitted login controller. want authenticate user using oauth2. since server , client part of same application wondering how go ahead. want authenticate user via oauth , return dashboard along bearer token next call can me made here.

please suggest how go ahead. if there better way more happy adapt it.

thanks

  1. configure authorization server spring-security-oauth. necessary endpoints mapped automatically (including /oauth/token)
  2. make simple webpage login form
  3. make post request /oauth/token username , password. in addition have send field called grant_type filled 'password' value.
    1. as response receive access token. means authenticated.

p.s. please pay attention oauth authorization standard, not authentication one!


Comments