ng-security icon indicating copy to clipboard operation
ng-security copied to clipboard

How can I use tokens in URL?

Open kashesandr opened this issue 8 years ago • 3 comments

Hi.

It's a nice library, I like it.

But how to access API that requires security tokens in the URL?

I tried to find something like getToken.. But found nothing..

kashesandr avatar Mar 16 '16 15:03 kashesandr

Now you can make use of the localStorage, for instance:

localStorage.getItem('ng-security-authorization')

ghost avatar Mar 16 '16 18:03 ghost

I did it with $cookies.get('ng-security-authorization') But honestly, I think it'd be better to have an option how to use the token: with header or with URL. How do you feel about that?

kashesandr avatar Mar 17 '16 08:03 kashesandr

This is a great idea! That may be helpful. Feel free to make a pull request. I'd really appreciate :smiley:

ghost avatar Mar 17 '16 17:03 ghost