https://github.com/mcleanra/angular-sp-digest
An AngularJS module that keeps the Sharepoint 2013 RequestDigest refreshed
https://github.com/mcleanra/angular-sp-digest
angular angularjs authentication digest digest-authentication sharepoint sharepoint2013
Last synced: 21 days ago
JSON representation
An AngularJS module that keeps the Sharepoint 2013 RequestDigest refreshed
- Host: GitHub
- URL: https://github.com/mcleanra/angular-sp-digest
- Owner: mcleanra
- Created: 2017-04-19T14:25:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-11T17:56:26.000Z (over 8 years ago)
- Last Synced: 2025-10-02T09:40:56.060Z (8 months ago)
- Topics: angular, angularjs, authentication, digest, digest-authentication, sharepoint, sharepoint2013
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-sp-digest
An AngularJS module that keeps the Sharepoint 2013 RequestDigest refreshed
## Requirements
- AngularJS
## Installing
### NPM
npm install angular-sp-digest
### Bower
bower install angular-sp-digest
## Usage
>Inject the module into your page:
```html
```
>Include this module as a dependency in your app:
```javascript
angular.module('myApp', ['angular.sp.digest']);
```
>Start the RequestDigestIntervalService on app start
```javascript
angular.module('myApp', ['angular.sp.digest'])
})
.run(['RequestDigestIntervalService', function(RequestDigestIntervalService){
//defaults to 24 minutes if you don't set this
RequestDigestIntervalService.setInterval(1440000);
RequestDigestIntervalService.start('/mysite');
RequestDigestIntervalService.start('/mysite/mysubsite');
RequestDigestIntervalService.start('/my-other-site');
RequestDigestIntervalService.start('/');
}]);
```
>To get your digest:
```javascript
RequestDigestCacheService.get('/mysite');
```
>To get a promise for a fresh digest from the server:
```javascript
RequestDigestService.get('/mysite');
```
## Contributing
git clone https://github.com/mcleanra/angular-sp-digest.git
### Install dependencies
npm install
### Build
Build the app
gulp