Integrating with Spring OAuth2 - No User Info URI
I'm trying to use Spring 2.x to integrate with the Box OAuth API. Spring requires that a user info URI is set when your grant-type is authorization_code. Is their API available for OAuth user info? I was unable to find any listed at https://developer.box.com/reference/
Spring documentation (see user-info-uri): https://docs.spring.io/spring-security/reference/servlet/oauth2/login/core.html
-
Hi Matthew,
I'm not familiar with Spring 2, but if I'm understanding the issue, it seems spring needs to query the logged in user information at some point.
If that is the case, the current logged in user info URL on the API is always:
https://api.box.com/2.0/users/me
Without any further customizations it will return:{ "type": "user", "id": "18622116055", "name": "Rui Barbosa", "login": "...@gmail.com", "created_at": "2022-02-18T08:50:21-08:00", "modified_at": "2023-02-24T07:32:28-08:00", "language": "en", "timezone": "America/New_York", "space_amount": 10737418240, "space_used": 245221300, "max_upload_size": 2147483648, "status": "active", "job_title": "", "phone": "", "address": "", "avatar_url": "https://app.box.com/api/avatar/large/18622116055", "notification_email": [] }
You can play with the fields query param if Spring needs something specific.See API documentation here.Let us know if this helped.
サインインしてコメントを残してください。
コメント
1件のコメント