ninjatronic / angular-base64

Base64 conversion for AngularJS
Other
186 stars 113 forks source link

Added Url Encoding. Added .gitignore. #4

Closed OliverRC closed 10 years ago

OliverRC commented 10 years ago

I am using your bower package to do some JWT authentication in Angular. Part of the JWT spec is to do base64 Url encoding which means removing some non-url safe characters from the base64 encoded string.

I've added these methods.

ninjatronic commented 10 years ago

I'm not sure about this. I don't really think it's a good idea to start including other encodings that are outside the narrow scope of the library. Is there any reason that you can't just do encodeURIComponent($base64.encode('whatever'))?

OliverRC commented 10 years ago

I'll take a look.

On Mon, Apr 21, 2014 at 5:52 PM, Pete Martin notifications@github.comwrote:

I'm not sure about this. I don't really think it's a good idea to start including other encodings that are outside the narrow scope of the library. Is there any reason that you can't just do encodeURIComponent($base64.encode('whatever'))?

— Reply to this email directly or view it on GitHubhttps://github.com/ninjatronic/angular-base64/pull/4#issuecomment-40946095 .

jimthedev commented 10 years ago

@ninjatronic That worked for me. On the flip side, when decoding, I just used $base64.decode(decodeURIComponent('encodedWhatever'))

Thanks.

ninjatronic commented 10 years ago

Glad these work for you

ninjatronic commented 9 years ago

See fe4a2499f4505ded31d3f196ffe923cc9e4c4a9a