Spring security with Oauth2 or Http-Basic authentication for the same resource

I managed to get this work based on the hints by Michael Ressler’s answer but with some tweaks. My goal was to allow both Basic Auth and Oauth on the same resource endpoints, e.g., /leafcase/123. I was trapped for quite some time due to the ordering of the filterChains (can be inspected in FilterChainProxy.filterChains); the … Read more

Clarification on id_token vs access_token

I like this Medium post about the difference, all cred to this author. https://medium.com/@nilasini/id-token-vs-access-token-17e7dd622084 If you are using Azure AD B2C like I am you can read more here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/openid-connect ID Token You will get id token if you are using scope as openid. Id token is specific to openid scope. With openid scope you … Read more

Testing flask-oauthlib locally without https

From http://requests-oauthlib.readthedocs.org/en/latest/examples/real_world_example.html: You should note that Oauth2 works through SSL layer. If your server is not parametrized to allow HTTPS, the fetch_token method will raise an oauthlib.oauth2.rfc6749.errors.InsecureTransportError . Most people don’t set SSL on their server while testing and that is fine. You can disable this check in two ways: By setting an environment variable. … Read more

oauth-private.key does not exist or is not readable

I think that this is due to Laravel Passport, you should try the following command: php artisan passport:install This command will create the encryption keys needed to generate secure access tokens. In addition, the command will create “personal access” and “password grant” clients which will be used to generate access tokens Source: https://laravel.com/docs/5.4/passport

“This app would like to: Have offline access” when access_type=online

I think G does this when your app requests a token and there is still a valid access or refresh token for the user for the scopes in question. The solution is to revoke tokens when you’re done with them (either on user logout or immediately after authenticating the user) by issuing this request: https://accounts.google.com/o/oauth2/revoke?token={token} … Read more

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