0.2.3 • Published 6 years ago

ccs-security-js v0.2.3

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

Description

This is js destributed as single file, which create global class AuthorisationContext

Install

npm install ccs-security-js

Usage

Add scripts to your app

<script src="node_modules/adal-angular/adal.js"></script>
<script src="node_modules/ccs-security-js/authorisation.js"></script>

Create service

var service=new AuthorisationContext({
            tenant: '<guid>',
            clientId: '<guid>',
            redirectUri: '<url>',
            endpoints: {
            '<url>': '<unique url or guid>',
            '<url>': '<unique url or guid>',
            ...
            },
            ocpApimSubscriptionKey: '<id>',
            organizationId: '<id>',
            getRoleUrl: '<url>',
            getRoleResource: '<unique url or guid>'
        });

Use it. For example, receive privileges

service.getPrivileges().subscribe(privileges=>{
    somediv.innerText= 'Privileges: ' + privileges.join(', ') + '.'
});
0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago