restful-authentication

How to parsing NSDate to RFC 822 always use in English?

萝らか妹 提交于 2019-12-24 03:35:19
问题 I need to PUT a RESTful to server. the Date must use like Sat, 19 Jan 2013 04:09:58 GMT . in objc I wrote this: NSDateFormatter* _GMTDateFormatter = [[NSDateFormatter alloc] init]; [_GMTDateFormatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss"]; [_GMTDateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; NSString* theDate = [_GMTDateFormatter stringFromDate:[NSDate date]]; theDate = [theDate stringByAppendingString:@" GMT"]; NSLog(@"%@",theDate); it will be output Sat, 19 Jan

Simple PHP REST server with secure user authentication and registered third party applications

陌路散爱 提交于 2019-12-23 09:44:07
问题 I'm looking into writing an PHP REST API that would allow registered users interact with the web service from third party applications. What I need the API to be able to do is: provide support for secure user authentication allow registered users to interact with the service from 3rd party applications this applications should be registered and approved on the system beforehand (similar to twitter) I was wondering what would be a good framework or library to start from that provides a good

JAX-RS Rest Filter does not invoke

北慕城南 提交于 2019-12-23 05:15:21
问题 I have an api that needs to implement security. But the filter is not invoked. my call pass directly to the endpoint... My Secure interface @NameBinding @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE,ElementType.METHOD}) public @interface Seguro {} My Filter @Seguro @Provider @Priority(Priorities.AUTHENTICATION) public class FiltroAutenticacao implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) throws IOException { String

Securing REST endpoint using spring security

点点圈 提交于 2019-12-22 04:13:07
问题 I am trying to provide security to the REST endpoints. I am following instructions from this page. In my case I don't have view hence I haven't created controller to specify the views and haven't added viewResolver in my AppConfig.java After implementation it correctly shows the access denied error upon calling a secured REST endpoint. But even though I specify username/password in the request header I get the access denied error. I am testing in postman setting username/password in Basic

Create a PostMan GET Request with JWT

送分小仙女□ 提交于 2019-12-22 00:26:03
问题 I am new using PostMan; normally I use curl: this one to get the JTW curl -X POST -H "X-Requested-With: XMLHttpRequest" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "username": "peris","password": "3nRam0nD3L3s0l1v3s" }' "http://139.152.231.107:1133/canPeris/auth" and this other one using the JTW obtained before curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciJIUzUxMiJ9

FreeRadius 3.0.13 rlm_rest restful api authentication

允我心安 提交于 2019-12-22 00:03:24
问题 I'm trying to authenticate Radius Requests against Restful API. My Virtual Server configuration as below: authorize { filter_username filter_password preprocess auth_log if (User-Password) { update control { Auth-Type := rest } } } authenticate { rest } My radius -X output is: (0) Received Access-Request Id 202 from 127.0.0.2:10708 to 127.0.0.2:1812 length 73 (0) User-Name = "bob" (0) User-Password = "hello" (0) NAS-IP-Address = 127.0.0.2 (0) NAS-Port = 1 (0) Message-Authenticator =

Pass Authenticity token through http header

跟風遠走 提交于 2019-12-21 18:44:11
问题 I have a rails application that uses a token to authenticate the user. Currently I am passing the token as params. I would like to change this. I believe it is possible to pass it through html header. I dont understand how to use authenticate_or_request_with_http_token do |token, options| . My rails app is actually a server for my iphone client. I things I dont understand are: I know options is nonce but how will that work out between my client and server? How do I actually use this in my

How to design URL to return data from the current user in a REST API?

大城市里の小女人 提交于 2019-12-21 04:20:27
问题 I have a REST based service where a user can return a list of their own books (this is a private list). The URL is currently ../api/users/{userId}/books With each call they will also be supplying an authentication token supplied earlier. My question(s) is: Is supplying the userId in the URL redundant? As we get a token with each call we can find out which user is performing the call and return their list of books. The userId is not strictly required. Would removing the userId break REST

FIle upload from a rest client to a rest server

▼魔方 西西 提交于 2019-12-21 02:21:07
问题 I created a rest server using the codeigniter rest server library created by PhilSturgeon : github.com/philsturgeon/codeigniter-restserver Now, I am using Codeignitor rest client : github.com/philsturgeon/codeigniter-restclient to get / post data from/to the rest server and am successfully able to get/post normal data. What is the best way to post image files to the rest server from the rest client ? Also, how can someone can access the API and perform all get/post operation from C# .NET

Is OAuth good choice for RESTful API in this SaaS scenario?

家住魔仙堡 提交于 2019-12-20 11:56:35
问题 Is OAuth sensible to use when the user account info (user id's, passwords, roles, etc) is going to be maintained in our own back-end and when there will not be any sharing of resources with other sites? Or is sharing the whole point of using OAuth? Background: I'm working on developing an enterprise SaaS product and we are creating a RESTful API to be used by our front-end applications. Consumers of the API will be browser and native smartphone (iOS & Android) applications that we develop.