Questions tagged [silhouette]

Silhouette is a framework agnostic authentication library for Scala that supports several authentication methods, including OAuth1, OAuth2, OpenID, CAS, Credentials, Basic Authentication, Two Factor Authentication or custom authentication schemes.

Source of excerpt: Silhouette

126 questions
1
vote
1 answer

How to override a case class attribute and avoid duplicated storage?

I have an use-case that would take advantage of case class attribute overriding if that was possible in Scala 2.12.x. My use-case is the following: there are multiple case classes in Play-Silhouette (P-S) e.g. LoginInfo that the library is built…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
1
vote
1 answer

Are 2FA TOTP scratch or recovery codes order-sensitive?

I'm working on a Google TOTP extension for Play-Silhouette, see the corresponding Play-Silhouette-Seed project here and was wondering whether the scratch or recovery codes are order-sensitive. By order-sensitive I mean that they must be used once…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
1
vote
1 answer

Cluster Analysis: correcting observations with negative silhouette width

I am trying to find patterns in a dataset (~1000 series) containing time series data with yearly frequency. Some sample data: V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 …
Liri
  • 350
  • 3
  • 19
1
vote
2 answers

How to analyse the integrity of clustering with no ground truth labels?

I'm clustering data (trying out multiple algorithms) and trying to evaluate the coherence/integrity of the resulting clusters from each algorithm. I do not have any ground truth labels, which rules out quite a few metrics for analysing the…
1
vote
2 answers

FakeRequest seem to be Null when passed to a controller in unit test

Getting Null Pointer error when unit testing controller. The issue seem to be in the line def signupUser = Action.async{ implicit request => { //requeust seem to be null I suspect so because the stacktrace from previous tests point to implicit…
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
1
vote
0 answers

not found: value on controller to upload files

implementation for uploading files with akka stream https://github.com/playframework/play-scala-fileupload-example/blob/2.5.x/app/controllers/HomeController.scala but compile error occured. not found value: filePicData which is located on…
fststp
  • 33
  • 6
1
vote
0 answers

Playframework [Scala]: Use public/private key pairs when working with JWTAuthenticator

I am considering adding OAuth2 with JWT authentication to a bunch of microservices written in Playframework using Scala. I would like to use JWT with RS256. I have been looking at Silhouette's JWTAuthenticator but it seems it does not support RS256…
ivanorone
  • 450
  • 4
  • 17
1
vote
0 answers

What is BodyParsers.Default and how to pass it to a function

I want to create instance of the following class defined at http://api.play.silhouette.rocks/5.0.0/com/mohiva/play/silhouette/api/actions/DefaultSecuredAction.html new DefaultSecuredAction(requestHandler: SecuredRequestHandler, bodyParser:…
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
1
vote
0 answers

Is it possible to see the code generated by Macwire

Is it possible to see what is the code generated by wire macro lazy val securedRequestHandler : SecuredRequestHandler = wire[DefaultSecuredRequestHandler] In the above example, I want to know what arguments were passed when…
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
1
vote
1 answer

why can't I pass companion object to a function

I am working on Silhouette framework and am creating an variable of type Environment. It's companion object has signature def apply[E <: Env]( identityServiceImpl: IdentityService[E#I], authenticatorServiceImpl: AuthenticatorService[E#A], …
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
1
vote
1 answer

Scala future chaining and Left/Right

I have this piece of code in the PLAY framework def ws: WebSocket = WebSocket.acceptOrResult[JsValue, JsValue] { rh => implicit val req = Request(rh, AnyContentAsEmpty) silhouette.SecuredRequestHandler { securedRequest => …
coolboyjules
  • 2,300
  • 4
  • 22
  • 42
1
vote
1 answer

Silhouette Unexpected exception playframework 2.6

I have a problem using Silhouette library in play framework,I am using guice for runtime dependency injection, there is an error when creating DelegableAuthInfoRepository which accepts a DelegableAuthInfoDAO as argument, it says DelegableAuthInfoDAO…
1
vote
0 answers

Play-silhouette: how to create roles on the fly?

I would like to be able to create and delete some Silhouette role on the fly, for instance add a role Manager that is not hard-coded. The only solution I see is to store these roles in a database. Silhouette needs me to implement this: case class…
Simon
  • 6,025
  • 7
  • 46
  • 98
1
vote
1 answer

How to smooth and extract an object from depth Image

I am using a dataset which provides depth images of human, I need to extract the object from this image or at least remove the other distortion in the image that not belong to the human body In Matlab. a sample of images is shown below: This is the…
Meme
  • 55
  • 1
  • 7
1
vote
2 answers

Different silhouette scores for the same data and number of clusters

I would like to choose an optimal number of clusters for my dataset using silhouette score. My data set are information about 2,000+ brands, including number of customers purchased this brand, sales for the brand and number of goods the brand sells…
1 2 3
8 9