Skip to content

Commit 487008e

Browse files
committed
add about AuthInfo #36
1 parent f501865 commit 487008e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,26 @@ If your data access is blocking for the data storage, then you just wrap your im
8484

8585
For more details, refer to Scaladoc of ```DataHandler```.
8686

87+
### AuthInfo
88+
89+
```DataHandler``` returns ```AuthInfo``` as authorized information.
90+
```AuthInfo``` is made up of the following fields.
91+
92+
```
93+
case class AuthInfo[User](user: User, clientId: Option[String], scope: Option[String], redirectUri: Option[String])
94+
```
95+
96+
- user
97+
- ```user``` is authorized by DataHandler
98+
- clientId
99+
- ```clientId``` which is sent from a client has been verified by ```DataHandler```
100+
- If your application requires client_id for client authentication, you can get ```clientId``` as below
101+
- ```val clientId = authInfo.clientId.getOrElse(throw new InvalidClient())```
102+
- scope
103+
- inform the client of the scope of the access token issued
104+
- redirectUri
105+
- This value must be enabled on authorization code grant
106+
87107
### Work with Playframework
88108

89109
You should follow three steps below to work with Playframework.

0 commit comments

Comments
 (0)