0
votes

I have a central server that provides basic REST endpoints for registering, login, logout. How do I integrate this seamlessly with my Rails application using Devise?

EDIT: I'm provided a REST API which basically tells me if a user/password combo is correct or not. I want Devise to hook up to this API instead of using local DB strategy, kinda like how Devise hooks up to OmniAuth. My situation is very similar to this guy Remote API Authentication With Rails 3 Using ActiveResource and Devise except I don't use ActiveResource and the authentication API doesn't return a token.

1

1 Answers

0
votes

HTTP Basic authentication is implemented by Devise, so the only code required is a call to authenticate_user! in your corresponding controller.

See this: How To: Use HTTP Basic Authentication and How To: Use HTTP Auth Basic with Devise for more information.