Yordan Borisov
Yordan Borisov

Reputation: 1652

RESTful security authorization

I have an application which is wrote with JS frameworks and it makes REST request to RESTful service which I wrote. The problem is that I want to put an authorization. I found OAuth 1.0a and OAuth 2 for using them for that purpose. How can I make a security authorization layer in my REST with public and private key for an example if the client is JS based application ( browser application)?

Upvotes: 0

Views: 96

Answers (2)

MvdD
MvdD

Reputation: 23494

You want to look at the implicit flow in OAuth 2.0 which is specifically geared towards clients running JavaScript in the browser.

It's not using asymmetric encryption directly in JavaScript. If you want to do that, you could look at the crypto-js library.

Upvotes: 1

Guy Bouallet
Guy Bouallet

Reputation: 2125

You can deploy your REST service on a server with SSL based client authentication. Here is how a tutorial on how you can do it on tomcat for example.

Upvotes: 0

Related Questions