nulab / scala-oauth2-provider

OAuth 2.0 server-side implementation written in Scala
MIT License
537 stars 97 forks source link

object OAuthGrantType is not a member of package scalaoauth2.provider #74

Closed berardino closed 9 years ago

berardino commented 9 years ago

I have cloned the play2.4 example project https://github.com/tsuyoshizawa/scala-oauth2-provider-example-skinny-orm and created a custom token endpoint, but it does not compile. I am getting the error object OAuthGrantType is not a member of package scalaoauth2.provider .

This happens when compiling the project in eclipse as well as from the shell with sbt compile. The strange thing is that in an other project where I was using spray , I was able to implement and successfully compile a custom endpoint. So seems to be related somehow to play ? Any suggestion ?

package controllers

import scalaoauth2.provider.TokenEndpoint
import scalaoauth2.provider.Password
import scalaoauth2.provider.OAuthGrantType._

class CustomTokenEndpoint extends TokenEndpoint {

  val passwordNoCred = new Password() {
    override def clientCredentialRequired = false
  }

  override val handlers = Map(
    PASSWORD -> passwordNoCred)
}
tsuyoshizawa commented 9 years ago

This problem was reproduced in my environment. I fixed this problem.

Me too. I'm not sure when we can't compile. Thanks for the report.

tsuyoshizawa commented 9 years ago

Backport for 0.15.x branch. I just published to maven central repository as 0.15.1.