简体   繁体   English

Microsoft Graph 的 OAuth2 客户端凭据流

[英]OAuth2 Client Credentials flow for Microsoft Graph

The OAuth2 specification for Client Credentials ( https://tools.ietf.org/html/rfc6749#section-4.4 ) says that "The authorization server MUST support the HTTP Basic authentication scheme for authenticating clients that were issued a client password" but MAY support including the client credentials in the body of the message.客户端凭据的 OAuth2 规范 ( https://tools.ietf.org/html/rfc6749#section-4.4 ) 说“授权服务器必须支持 HTTP 基本身份验证方案,用于对已发出客户端密码的客户端进行身份验证”但可以支持在消息正文中包含客户端凭据。

I can see from the Microsoft Graph API documentation that they describe using this latter method.我可以从 Microsoft Graph API 文档中看到他们使用后一种方法进行了描述。

However, does this mean that the Basic Authentication approach is NOT supported or just that the alternative approach is preferred?但是,这是否意味着不支持基本身份验证方法或只是首选替代方法?

Thanks.谢谢。

Please see token_type in the response .请参阅响应中的token_type

token_type Indicates the token type value. token_type 表示令牌类型值。 The only type that Microsoft identity platform supports is bearer . Microsoft 标识平台支持的唯一类型是bearer

For your question in the comment, if the access token has expired, it will show an 401 error.对于您在评论中提出的问题,如果访问令牌已过期,则会显示 401 错误。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM