OAuth 2: separating resource server and authorization server

OAauth2 framework docs : https://www.rfc-editor.org/rfc/rfc6749 (A) The client requests an access token by authenticating with the authorization server and presenting an authorization grant. (B) The authorization server authenticates the client and validates the authorization grant, and if valid, issues an access token and a refresh token. (C) The client makes a protected resource request to … Read more

Examples of the best SOAP/REST/RPC web APIs? And why do you like them? And what’s wrong with them? [closed]

Here’s my take. Although coming from a Java standpoint, I actually prefer REST. SOAP envelope with multiple namespaces and its complex structure is abomination. It tries to solve mostly imaginary problems, and doesn’t solve anything efficiently. Only thing about SOAP I’ve found useful is that it has standards for authorization and errors. On the other … Read more

What status code should I use when session token is invalid?

401 Unauthorized. Your existing session token doesn’t authorize you any more, so you are unauthorized. Don’t forget that a session token is just a short-cut to avoid having to provide credentials for every request. Sending 404 is incorrect because, as you observe, the resource does exist. You just don’t currently have authorization to see it. … Read more

why is the lift web framework scalable?

Lift’s approach to scalability is within a single machine. Scaling across machines is a larger, tougher topic. The short answer there is: Scala and Lift don’t do anything to either help or hinder horizontal scaling. As far as actors within a single machine, Lift achieves better scalability because a single instance can handle more concurrent … Read more

What is service discovery, and why do you need it?

Let’s start by reviewing what service-discovery is – here’s a good explanation: https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/ (this link should pretty much clarify the issue asked) And here’s an example how it is used in practice: Suppose you have service B which is used by service A. Service B (like most services in SOA) is actually a cluster of … Read more

Web service – current time zone for a city? [closed]

We encountered same issue and, alongside the great suggestions above, Google appears to have two complementary APIs, one for Time Zone from geocode (latitude/longitude) data and the geocode API. For example, to get the time zone and offset for San Francisco: 1) Convert the city to a geocoded location: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,+CA&sensor=false The geocoded location is in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)