[keycloak-user] How to import keycloak-authz from keycloak-js npm package in TypeScript?

Marcel Német Marcel.Nemet at gmail.com
Wed Mar 28 08:51:01 EDT 2018


 I managed to import it as

import * as KeycloakAuthorization from 'keycloak-js/dist/keycloak-authz';

I am also wondering whether the line number 21 of file keycloak-authz.d.ts has
an error in it.

Should it be

import * as Keycloak from 'keycloak-js';

instead of

import * as Keycloak from 'keycloak';

I will open an issue.

On Thu, Mar 22, 2018 at 11:13 AM, Pedro Igor Silva <psilva at redhat.com>
wrote:

> Will check this out.
>
> On Thu, Mar 22, 2018 at 5:07 AM, Marcel Német <Marcel.Nemet at gmail.com>
> wrote:
>
>> I can easily import Keycloak.d.ts from keycloak-js npm module using
>>
>> import * as Keycloak from 'keycloak-js';
>>
>> but I am failing to import the keycloak-authz.d.ts file and
>> the KeycloakAuthorization which is defined inside it.
>>
>> I wonder if anybody knows how to do it or did it previously. Not sure
>> whether keycloak-authz is made available at the npm package level.
>>
>> A loosely related issue I found online is:
>> https://issues.jboss.org/browse/KEYCLOAK-4822
>>
>> --
>> Marcel Német
>> marcel.nemet at gmail.com
>> 0795153648 <079%20515%2036%2048>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
>


-- 
Marcel Német
marcel.nemet at gmail.com
0795153648


More information about the keycloak-user mailing list