You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [the project](https://github.com/nulab/akka-http-oauth2-provider)
50
29
51
30
### Other frameworks
52
31
53
-
Add `scala-oauth2-core` instead. In this case, you need to implement your own OAuth provider working with web framework you use.
32
+
Add `scala-oauth2-core` library dependencies of your project.
33
+
In this case, you need to implement your own OAuth provider working with web framework you use.
54
34
55
35
```scala
56
36
libraryDependencies ++=Seq(
@@ -120,116 +100,3 @@ case class AuthInfo[User](
120
100
- inform the client of the scope of the access token issued
121
101
- redirectUri
122
102
- This value must be enabled on authorization code grant
123
-
124
-
### Work with Play Framework
125
-
126
-
You should follow four steps below to work with Play Framework.
127
-
128
-
* Customizing Grant Handlers
129
-
* Define a controller to issue access token
130
-
* Assign a route to the controller
131
-
* Access to an authorized resource
132
-
133
-
You want to use which grant types are supported or to use a customized handler for a grant type, you should override the ```handlers``` map in a customized ```TokenEndpoint``` trait.
Here's an example of a customized ```TokenEndpoint``` that 1) only supports the ```password``` grant type, and 2) customizes the ```password``` grant type handler to not require client credentials:
148
-
149
-
```scala
150
-
classMyTokenEndpointextendsTokenEndpoint {
151
-
valpasswordNoCred=newPassword() {
152
-
overridedefclientCredentialRequired=false
153
-
}
154
-
155
-
overridevalhandlers=Map(
156
-
OAuthGrantType.PASSWORD-> passwordNoCred
157
-
)
158
-
}
159
-
```
160
-
161
-
Define your own controller with mixining ```OAuth2Provider``` trait provided by this library to issue access token with customized `TokenEndpoint`.
0 commit comments