package Ġcom . ve ge soft . efficient sp ending . account . infrastructure . configuration Ċ Ċ import Ġorg . springframework . boot . autoconfigure . security . oauth 2 . client . Enable OAuth 2 S so Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . http . HttpMethod Ċ import Ġorg . springframework . security . config . annotation . web . builders . Http Security Ċ import Ġorg . springframework . security . config . annotation . web . configuration . Web Security Configurer Adapter Ċ import Ġorg . springframework . security . oauth 2 . config . annotation . web . configuration . Enable Resource Server ĊĊ Ċ @ Configuration Ċ @ Enable OAuth 2 S so Ċ class ĠAccount Security Config Ġ: ĠWeb Security Configurer Adapter () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure ( http : ĠHttp Security ) Ġ{ ĊĠĠĠĠĠĠĠ Ġhttp . authorize Requests () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. ant Matchers ("/ error "). permit All () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. ant Matchers ( HttpMethod . POST , Ġ"/ accounts "). permit All () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. any Request (). authenticated (); ĊĠĠĠ Ġ} Ċ }