2.0.0 • Published 2 years ago

@legtech/azureauthentication v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
2 years ago

Function to initiate polling that will keep your Azure AD token alive. Needed with POSTs and ajax calls.

To use, put the following in your layout (or in a single view if applicable):

<script>
    var renewUrl = WSL.Url.resolve([Your renewal url]);
    WSLApp.AzureAuthentication.renewAzureSessionBeforeExpiration([token expiration string],renewUrl, [tokenLifetimeInMinutes], [expirationBufferInMinutes]);
</script>

Notes: 1. Your renewal url should be a link to a controller method that forces a reauthentication 1. Your token expiration string should be the expriation of your access token which is found in the claim.
1. Your tokenLifetimeInMinutes is how long your token is configured to last in Azure AD. Typically this is 1 hour (ask TSG to confirm for your app if needed). This js file defaults to 60 mins if you don't pass a value. 1. Your expirationBufferInMinutes is the buffer allowed before token expiration when a re-auth is tried. This js file defaults to 5 minutes if you don't pass a value.

1.0.2

2 years ago

2.0.0

2 years ago

1.0.1

6 years ago

1.0.0

6 years ago