restful-authentication

Which is the better way to implement authentication using login/password AND other social networks?

我与影子孤独终老i 提交于 2019-12-13 19:06:12
问题 I'm gonna try to explain my problem : I'd like to allow users to connect to my api via their own accounts (login/password) or via a social network (Facebook at first). Then, I would allow any application to use my api, with the user authenticated. My first thought when to auth the user via his/her login/password and return a token used as the session for the next requests. But OAuth would seems to be the better implementations, except I don't know how to do this : One of my applications will

Where do I put the REST Client Authentication Data in the Query?

*爱你&永不变心* 提交于 2019-12-13 06:34:10
问题 I need to work with REST api in android application which is created by my client. Below text is just copied from the pdf the client provides us. -- In this example, a new user is created. The parts of a possible request to the server is shown below: Message part Contents Header POST {url-prefix}/rest/user Content-Type: application/xml Content-Length: 205 Body <request> <client> <id>XY</id> <name>myName</name> <password>myPassword</password> </client> <user> <name>myUserName</name> <password

Spring MVC Security Token based Authentication

女生的网名这么多〃 提交于 2019-12-13 06:18:21
问题 Can anyone please help me in this. I have been assigned to secure an existing web application. Issue: when a user already logs into the application (that means the session is active), at that time an attacker can guess the input fields and save url and create a similar page and send a hyper link. If the user clicks on that link, it will not go through javascript, rather it will hit the spring controller. Since the session is active, it will save the attackers data into the database. Here is

Azure OAuth to function app issues

自闭症网瘾萝莉.ら 提交于 2019-12-13 04:04:51
问题 I have a very basic function app that takes a GET and returns some static text. Eventually I would like it to write a POST body to a queue but to keep it simple the function just returns text. If I keep auth off, I can load the url and get a response in my browser or postman. If I enable aad auth within the function app and create a simple app reg then goto the site in my browser I get prompted for auth and I can login interactively; no worries so far. I would like to access the function

IS it possible to have One way and mutual ssl for same web App same time depending on URLs

旧街凉风 提交于 2019-12-13 01:43:51
问题 I have a scenario where I have few rest web services, of which few need to enforce mutual ssl and few should just have one way ssl, here its same web application. Is that possible in tomcat/Spring based application? 回答1: Sorry for replying late, yes I did this, not sure if the best way but kind of a hack. Step 1: Have one way SSL set with clientAuth=want in your tomcat. This will fix your scenario where you want to have one way ssl for all the webservices accept that one which needs extra

Basic Auth with Tomcat not working

梦想与她 提交于 2019-12-13 00:14:01
问题 I know that there are alot of topics about this. But I dont get my auth running... Here my code: tomcat-users.xml <role rolename="user"/> <user username="user" password="geheimu" roles="user"/> <role rolename="admin"/> <user username="admin" password="geheima" roles="admin,user"/> server.xml <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users

passport jwt verify callback not called

元气小坏坏 提交于 2019-12-12 15:03:43
问题 I'm using passport-jwt package for simple authentication and the token is generated by jsonwebtoken. But the problem is that verify callback is never called. Here my passport.js code. var JwtStrategy = require('passport-jwt').Strategy; var User = require('../app/models/user'); var config = require('../config/database'); var opts = {}; opts.jwtFromRequest = function(req) { var token = null; if (req && req.headers) { token = req.headers.authorization; } return token; }; opts.secretOrKey =

How to uniquely identify your Android app for rest API

五迷三道 提交于 2019-12-12 08:51:44
问题 Is there a way to uniquely identify my Android App in Java code? Maybe some combination of the package name and something else? I know there is a way to identify a unique Android device, but that is not what I am looking for. I want to be able to uniquely identify my Android app that I made so that I can then pass that information to my own private RESTful API. This would allow me to verify that the call is coming from my Android App and not another unauthorized one. I want my RESTful API to

Flask RESTful API and authenticating for a specific user

久未见 提交于 2019-12-12 05:48:44
问题 I am relatively new to RESTful API, so it is certainly possible I am not designing this correctly. I want to return a different subsets of a JSON user object from /api/users/[user_id] based on who is authenticating. So if the user "alice" is trying to access /api/users/alice, she would get much more of her info (such as private settings, etc) than user "bob" who would simply get her public profile. I am currently using flask_restful with httpbasicauth. Right now I have the following: class

In Ruby on Rails Restful Authentication, UsersController#new, a @user = User.new is used. Is it actually needed?

拟墨画扇 提交于 2019-12-12 05:16:07
问题 After script/generate authenticated user sessions users_controller.rb is created with def new @user = User.new end and the view has this line: @user.password = @user.password_confirmation = nil and that's it. Is this actually needed? I mean the form will POST to /users which is by RESTful routing, going to UsersController#create , so the @user created actually is never used. Is it actually needed and why? thanks. Update: @user is never used again any where else... also, I tried removing those