onedrive for business authentication client credentials flow oAuth 2.0
onedrive for business authentication client credentials flow oAuth 2.0
我正在为业务开发 onderive,需要客户端凭据流才能通过 java 访问它。任何人都可以为我提供上述来源的身份验证示例,以便我可以处理它!
我正在尝试遵循此流程,但我遗漏了一些上下文,这让我只能完成部分工作。
我已成功创建证书并上传到清单。但不能再进一步了。您能否帮助我了解如何基于此 X.509 证书进行身份验证的过程。
看来你需要Use a SAML 2.0 identity provider to implement single sign-on。
但我认为使用OAuth2认证是推荐的方式。
Java 在 GitHub 上有一个 OneDrive 的 sample project 我想你可以参考并使用 OneDrive for Business 的 url 而不是 url 对于 OneDrive。
例如,要获取授权码,请使用 OneDrive for Business https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id={client_id}&redirect_uri={redirect_uri}
的 url 而不是 OneDrive https://login.live.com/oauth20_authorize.srf?client_id={client_id}&scope={scope}&response_type=code&redirect_uri={redirect_uri}
的 url。
在示例项目中,OneDriveAuthorisationProvider.java
实现了身份验证过程,您可以更改代码以与 OneDrive for Business 兼容。
作为参考,请参阅下面的文档。
- OneDrive 身份验证和登录https://dev.onedrive.com/auth/msa_oauth.htm
- OneDrive for Business 身份验证和登录https://dev.onedrive.com/auth/aad_oauth.htm
希望对您有所帮助。
我正在为业务开发 onderive,需要客户端凭据流才能通过 java 访问它。任何人都可以为我提供上述来源的身份验证示例,以便我可以处理它!
我正在尝试遵循此流程,但我遗漏了一些上下文,这让我只能完成部分工作。
我已成功创建证书并上传到清单。但不能再进一步了。您能否帮助我了解如何基于此 X.509 证书进行身份验证的过程。
看来你需要Use a SAML 2.0 identity provider to implement single sign-on。
但我认为使用OAuth2认证是推荐的方式。
Java 在 GitHub 上有一个 OneDrive 的 sample project 我想你可以参考并使用 OneDrive for Business 的 url 而不是 url 对于 OneDrive。
例如,要获取授权码,请使用 OneDrive for Business https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id={client_id}&redirect_uri={redirect_uri}
的 url 而不是 OneDrive https://login.live.com/oauth20_authorize.srf?client_id={client_id}&scope={scope}&response_type=code&redirect_uri={redirect_uri}
的 url。
在示例项目中,OneDriveAuthorisationProvider.java
实现了身份验证过程,您可以更改代码以与 OneDrive for Business 兼容。
作为参考,请参阅下面的文档。
- OneDrive 身份验证和登录https://dev.onedrive.com/auth/msa_oauth.htm
- OneDrive for Business 身份验证和登录https://dev.onedrive.com/auth/aad_oauth.htm
希望对您有所帮助。