2. What is OAuth
OAuth 2 is an authorization framework that
enables applications to obtain limited
access to user accounts on an HTTP
service, such as Facebook, GitHub, and
DigitalOcean. It works by delegating user
authentication to the service that hosts the
user account, and authorizing third-party
applications to access the user account.
9. Add User
Role roleUser = new Role(authority:
'ROLE_USER').save(flush: true)
User user = new User(
username: 'user1',
password: 'user1',
enabled: true,
accountExpired: false,
10. Add Client
new RestClient(
clientId: 'AskMeBazaar',
authorizedGrantTypes:
['authorization_code', 'refresh_token',
'implicit', 'password', 'client_credentials'],
authorities: ['ROLE_CLIENT'],
scopes: ['read', 'write'],
redirectUris: ['path of your
application where u want to render the auth