Authenticate Users Using Subdomains
harmeetsingh0013 opened this issue · comments
Harmeet Singh(Taara) commented
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.
Tsuyoshi Yoshizawa commented
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