简体   繁体   English

Azure AD使用刷新令牌访问使用JavaScript的访问令牌

[英]Azure AD using refresh token to access access token using javascript

I am using Azure AD to fetch access token. 我正在使用Azure AD来获取访问令牌。 I am using Javascript and HTML to get user logged in and on successful login I got access token and expire time. 我正在使用Javascript和HTML来使用户登录,成功登录后,我获得了访问令牌和到期时间。 Now I am looking forward to get the renewed access token on completion of expire time, I anybody can provide me a solution in javascript which uses the refresh token to fetch new access token. 现在,我期待在到期时间结束后获得更新的访问令牌,我谁都可以使用javascript提供的解决方案来使用刷新令牌来获取新的访问令牌。

JavaScript apps executing in a browser don't rely on refresh tokens representing sessions. 在浏览器中执行的JavaScript应用程序不依赖于代表会话的刷新令牌。 The session is maintained by the cookie that Azure AD issues upon successful authentication. 会话由Azure AD在成功身份验证后发出的cookie维护。 Applications can leverage that session for renewing access tokens, typically by using a hidden iframe that requests tokens via implicit flow and no UX (enforced via prompt=none parameter). 应用程序可以利用该会话来更新访问令牌,通常是通过使用一个隐式iframe来实现的,该iframe通过隐式流而不是UX(通过hint = none参数强制)来请求令牌。 The Azure AD libraries for SPA apps (ADAL JS and MSAL JS) perform those renewal operations automatically for you, implementing the approach I described earlier. SPA应用程序(ADAL JS和MSAL JS)的Azure AD库自动为您执行这些续订操作,从而实现了我前面介绍的方法。 Please see https://azure.microsoft.com/en-us/resources/samples/?service=active-directory&term=javascript for a collection of samples demonstrating usage of those libraries. 请参阅https://azure.microsoft.com/zh-cn/resources/samples/?service=active-directory&term=javascript ,以获取展示这些库用法的样本集合。

暂无
暂无

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

相关问题 在 Javascript 中使用访问令牌和刷新令牌 - Using access token and refresh token in Javascript 使用JWT令牌使访问令牌过期时刷新令牌调用 - Refresh Token call when Access token expired using JWT token 使用 javascript 刷新谷歌日历 api 的访问令牌(反应) - refresh access token for google calendar api using javascript (react) 使用Azure AD身份验证库(角度5中的ADAL)获取Id_token,但是如何从Id_token获取访问令牌? - getting Id_token using Azure AD Authentication Library(ADAL in angular 5), but how to get access token from Id_token? 从 azure 广告刷新访问令牌 - Refreshing the access token from azure ad 如何在没有任何用户的情况下从Azure AD应用程序中使用Javascript在SPFX或Sharepoint页面中使用client_id和client_secret从Azure AD应用程序读取访问令牌? - How to read the access token without any user from Azure AD Application using client_id and client_secret in SPFX or Sharepoint Page using Javascript? 在Javascript中对Google SpreadSheet API使用令牌访问 - Using token access for Google SpreadSheet API in Javascript 使用 Javascript API 检索访问令牌 - Retrieve Access Token Using Javascript API 使用Javascript获取Twitter访问令牌 - Get Twitter Access Token using Javascript C# Owin 处理 401 访问令牌错误并使用刷新令牌重新生成访问令牌 - C# Owin handle 401 access token errors and regenerate access tokens using refresh token
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM