Silhouette is an authentication library for Play Framework applications that supports several authentication methods, including OAuth1, OAuth2, OpenID, Credentials or custom authentication schemes.
akkie on master
Update README.md (compare)
akkie on master
Update README.md (compare)
akkie on gh-pages
updated site (compare)
akkie on gh-pages
updated site (compare)
akkie on gh-pages
updated site (compare)
akkie on master
Fixed Auth0ProfileParser to get… (compare)
akkie on gh-pages
updated site (compare)
akkie on gh-pages
updated site (compare)
@akkie
plugins.sbt content:
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += "Atlassian Releases" at "https://maven.atlassian.com/public/"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.1")
./scripts/sbt update
@akkie [info] play.api.Play - Application started (Dev)
java.lang.UnsupportedClassVersionError: controllers/routes has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I've installed jdk-8u191-windows-x64 - the version of jdk/jre is too high?
[info] play.api.Play - Application started (Dev)
java.lang.UnsupportedClassVersionError: controllers/routes has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
same issue after sdk clean and removing target directory (
@Provides
def provideJwtAuthenticatorService(
@Named("authenticator-crypter") crypter: Crypter,
idGenerator: IDGenerator,
configuration: Configuration,
clock: Clock): AuthenticatorService[JWTAuthenticator] = {
val config = configuration.underlying.as[JWTAuthenticatorSettings]("silhouette.jwt.authenticator")
val encoder = new CrypterAuthenticatorEncoder(crypter)
new JWTAuthenticatorService(config, None, encoder, idGenerator, clock)
}
...
silhouette.conf:
jwt.authenticator.headerName="X-Auth-Token"
jwt.authenticator.issuerClaim="PlaySilhouetteRest"
jwt.authenticator.encryptSubject=true
jwt.authenticator.authenticatorExpiry=12 hours
jwt.authenticator.sharedSecret="changeme"
jwt.authenticator.rememberMe.authenticatorExpiry=30 days
jwt.authenticator.rememberMe.authenticatorIdleTimeout=5 days
jwt.authenticator.crypter.key = "[changeme]" // A unique encryption key
Cannot generate a config value reader for type Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]], because value readers cannot be auto-generated for types with type parameters. Consider defining your own ValueReader[Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]]]
What I am doing wrong here?!
`def secured = silhouette.SecuredAction(WithProviderBTEnv#A).async { implicit request: SecuredRequest[BTEnv, AnyContent] =>
Future.successful(Ok("42"))
}and
trait BTEnv extends Env {
type I = User
type A = BearerTokenAuthenticator
}`
andval ID = "myprovider"
and
If I have custom Provider, which extends OAuth2Provider
how should I inject this provider into action, to use BearerTokenAuth?
def secured = silhouette.SecuredAction(WithProviderBTEnv#A) { implicit request: SecuredRequest[BTEnv, AnyContent] =>
Ok("42")
}