Skip to content

Support Implicit grant

Compare
Choose a tag to compare
@tsuyoshizawa tsuyoshizawa released this 17 Jan 16:04
· 103 commits to main since this release
  • Added Implicit grant

Breaking compatibility

Improved AuthorizationHandler #76

These methods of AuthorizationHandler signature to get AuthorizationRequest.
You don't need to define findClientUser method which integrated in findUser method.

  • def validateClient(clientCredential: ClientCredential, grantType: String)
  • def findUser(username: String, password: String)
  • def findClientUser(clientCredential: ClientCredential, scope: Option[String])

Disable grant types by default #77

You need to customize TokenEndpoint trait and use it to you want to use grant types. See README.md.

class CustomizedTokenEndpoint extends TokenEndpoint {
  override val handlers = Map(
    OAuthGrantType.AUTHORIZATION_CODE -> new AuthorizationCode(),
    OAuthGrantType.REFRESH_TOKEN -> new RefreshToken(),
    OAuthGrantType.CLIENT_CREDENTIALS -> new ClientCredentials(),
    OAuthGrantType.PASSWORD -> new Password(),
    OAuthGrantType.IMPLICIT -> new Implicit()
  )
}