nulab / scala-oauth2-provider

OAuth 2.0 server-side implementation written in Scala

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authenticate Users Using Subdomains

harmeetsingh0013 opened this issue · comments

Hello,

I want authenticate user according to sub-domain. I am using Play-Framework 2.3, i just need to pass extra parameter with my domain in def validateClient(clientCredential: ClientCredential, grantType: String): Future[Boolean] method, so, i will check user domain also. How can i, do that.

You can pass Request instance (or only domain value) of Play Framework to instantiation DataHandeler.
Then validateClient method can refer the value.

issueTokenAccessToken(new YourDataHandler(request))

Request class has domain property, you can check it.

https://www.playframework.com/documentation/2.3.x/api/scala/index.html#play.api.mvc.Request