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
0
votes
1 answer

unable to create `Environment` in `Silhouette`

I am trying to create the Environment in Silhouette but am unable to. I have defined the Identity and Authenticator as follows trait SessionEnv extends Env { type I = User type A = SessionAuthenticator } Next, I suppose I have to create the…
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
0
votes
1 answer

How do I pass request.identity to the view

def edit(id: String) = SecuredAction(WithService("master")).async {implicit request => val futureEmp = collection.flatMap(_.find(Json.obj("_id" -> Json.obj("$oid" -> id))).cursor[Employee]().collect[List]()) futureEmp.map { emps: List[Employee]…
0
votes
2 answers

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(): Silhouette performance algorithm

I implemented kmeans algorithm in python and was trying to compute the silhouette performance of cluster for various values of k. Here are few variables for a small part of the dataset. def avgdist(pt, clust): dists = [] for elem in clust: …
CharcoalG
  • 185
  • 4
  • 12
0
votes
1 answer

could not find implicit value for parameter env: com.mohiva.play.silhouette.api.Environment[utils.auth.DefaultEnv]

I'm using a Silhouette v4.0 library with play framework 2.5. And have been trying to write test code using play specs2. But, I get the following error with my test class as below. Error Message [error] could not find implicit value for parameter…
Uske
  • 173
  • 1
  • 1
  • 8
0
votes
1 answer

Silhouette analysis on KMeans clustering

How to fix this error? Why did the code fail to visualize plot? TypeError: 'numpy.ndarray' object is not callable Input data_sillet = np.loadtxt('clustering_sillet.csv', delimiter=',') data = data_sillet.astype(int) data Output array([ 2, 3, 8,…
user8458492
0
votes
2 answers

How can I add persistence to Play Silhouette password hasher registry?

I'm looking at the Play Silhouette seed example: https://github.com/mohiva/play-silhouette-seed It is clear how to add persistence to UserDAO and AuthTokenDAO because they have in memory implementations UserDAOImpl and AuthTokenDAOImpl which you can…
sbtpr
  • 541
  • 5
  • 18
0
votes
2 answers

Stateless Silhouette CookieAuthenticator can't find / deletes cookie

I have a Play app that allows users to log in with social providers, and have authentication set up identically to the Play-Silhouette-Slick seed example. The following code is probably fine, but I included it anyway. def authenticate(provider:…
rusins
  • 309
  • 4
  • 8
0
votes
1 answer

How to combine a Silhouette-4.0.X UserAwareAction with Cache Action?

I'm trying to combine UserAwareAction with Cache. I'm able to get CacheBeforeSilhouette but not the other way around? Could anyone give me a hint on how to do this? @Singleton class MessageController @Inject() ( implicit val env:…
raisercostin
  • 8,777
  • 5
  • 67
  • 76
0
votes
1 answer

sklearn clustering: calculate silhouette coefficient on TF-IDF-weigthed data

I'd like to calculate the silhouette_score like the scikit-learn example silhouette_analysis. from sklearn.feature_extraction.text import TfidfVectorizer tfidf_vectorizer = TfidfVectorizer(use_idf=True) sampleText = [] sampleText.append("Some text…
C-Jay
  • 621
  • 1
  • 11
  • 22
0
votes
0 answers

Doubts re. Play 2.5 with silhouette 4.0 seed project

I have created sample seed project with help of existing activator seed samples. Project basically does User/Password authentication with role based authorization. You can find full source code at…
Pari
  • 1,443
  • 3
  • 19
  • 34
0
votes
1 answer

Disable or Bypass Session and Authentication in Play Silhouette framework

Currently my application is secured using Silhouette, I don't use any of the fancy social Authentication features. Just simple username/password The problem: I need to open my end points to an external web app, This will allow the web app to Ajax…
InsaneBot
  • 2,422
  • 2
  • 19
  • 31
0
votes
0 answers

what the meaning of histogram of silhouette?

I know the silhouette is the person body that we get it using for example background subtraction. but what is the histogram of silhouette and what the benefit of it. since I 've read in many papers that they are used the histogram of silhouette as a…
0
votes
1 answer

calculate Silhouette Score of the scipy's fcluster using scikit-learn silhouette score

I am doing hierarchy clustering using scipy.cluster followed by fcluster under different cutoff. I want to also use scikit's silhouette_score. I see the post How to calculate Silhouette Score of the scipy's fcluster using scikit-learn silhouette…
user1830108
  • 195
  • 1
  • 15
0
votes
1 answer

Scala silhouette cannot authenticate

Using Scala Silhouette slick seed template I am trying to implement authentication in Play. On authentication (when you click sign in) - I get this error in console. Any ideas on where to proceed to fix this? I have to note I am fairly new to…
0
votes
0 answers

Scala play-silhouette 2.0 - update user password

I'm using play-silhouette v2.0 plugin to manage authentication in my play2/scala application. I would like to know how to handle the password update for a user. I can't find any docs/example on that. The only example I found is this but it is…
tano
  • 836
  • 1
  • 10
  • 25
1 2 3
8
9