oauth-2.0

Should I explicitly verify Keycloak token or this is done by Keycloak adapter?

旧时模样 提交于 2021-02-10 23:09:50
问题 There is a Spring-boot REST API, that needs to be secured by Keycloak, the application is using Keycloak-Spring-Security adapter (6.0.1). A call to an API endpoint, carries along the bearer token, obtained from Keycloak (currently through postman). I'm able to perform a successful REST endpoint call, but other thing is troubling me - should I explicitly verify the token against the public key? 1 - Is the adapter performing verification of the token against the public key, or should I

Login with personal Microsoft accounts failes to Oauth2 v2

大城市里の小女人 提交于 2021-02-10 23:06:11
问题 I did register a new Application on portal.azure.com with my Office365 company account to Access the GraphAPI. While authentication is working for users from our own domain (the one registered with O365), I keep getting an error for users from personal Microsoft accounts (outlook.com or live.com). I did setup the Application to support 'All Microsoft account users'. This is the Manifest { "id": "valid-uid", "acceptMappedClaims": null, "accessTokenAcceptedVersion": 2, "addIns": [],

Identify logged in Google Account user with OAuth2.0

半世苍凉 提交于 2021-02-10 20:08:48
问题 I am developing a web application that uses OAuth2 to login the users with their Google Accounts. I am also accessing some Google Data APIs so I am asking for refresh tokens and offline access too( in case that it makes a difference ). My problem is the following : after the app's user first comes to login, does OAuth and I save the tokens/user id in the database, I need to have in place a system that identifies the user on subsequent visits. I do this by saving the Google user ID (obtained

Heroku Python Django App Deployment Failure: No module named 'oauth2_provider'

穿精又带淫゛_ 提交于 2021-02-10 15:56:19
问题 I am following the Django OAuth Toolkit tutorial. I have the app running successfully on my local server with Django OAuth Toolkit installed. When I try to deploy to Heroku I get a "ModuleNotFoundError: No module named 'oauth2_provider'" error while running '$ python manage.py collectstatic --noinput'. I have attempted to search Stack Overflow for similar questions but was unable to find one. I saw many questions on Stack Overflow relating to collectstatic but I do not think that is my

FlowExchangeError thrown when getting access token OAuth via Google

删除回忆录丶 提交于 2021-02-10 15:00:45
问题 I want to add 'sign-in via GMail' functionality to a website. I create login.html and project.py to process the response. I add a button to login.html : function renderButton() { gapi.signin2.render('my-signin2', { 'scope': 'profile email', 'width': 240, 'height': 50, 'longtitle': true, 'theme': 'dark', 'onsuccess': signInCallback, 'onfailure': signInCallback }); }; I have a callBack function. In the browser console, I can see that the response contains access_token , id_token (what is the

FlowExchangeError thrown when getting access token OAuth via Google

匆匆过客 提交于 2021-02-10 14:58:44
问题 I want to add 'sign-in via GMail' functionality to a website. I create login.html and project.py to process the response. I add a button to login.html : function renderButton() { gapi.signin2.render('my-signin2', { 'scope': 'profile email', 'width': 240, 'height': 50, 'longtitle': true, 'theme': 'dark', 'onsuccess': signInCallback, 'onfailure': signInCallback }); }; I have a callBack function. In the browser console, I can see that the response contains access_token , id_token (what is the

How to securely store the Access-Token of a Discord(OAuth2) User?

百般思念 提交于 2021-02-10 10:53:46
问题 I'm struggling to find a way to securely save an Access-Token, which my web application retrieved from the DiscordAPI after the user authorized the application. I'm creating a web-interface for a Discord Bot. Here it is important, that not everyone can use it. Only server-moderators and such on a specific Discord server should be allowed to access most parts of the website. For this I'm using the OAuth2 stuff from Discord to retrieve an Access-Token with which I can get user info, such as

ASOS - Token validation is not working when having separate authorization server and the resource server

时光总嘲笑我的痴心妄想 提交于 2021-02-10 06:24:15
问题 I'm trying to impement the OpenID Connect server (resource owner password credentials grant) with ASOS by this post. Everything works fine when I have both Authorization server and resource server in one app. But when I split them on two apps (but on one machine) resource server fails to validate token and returns The access token is not valid . I downloaded the source code of AspNet.Security.OAuth.Validation to investigate the issue and it returns null here Here are some logs from

Asp.Net Core google-signin oauth restrict access and get g-suite roles

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 16:33:28
问题 I am making a .NET Core application with web views where I need to authenticate users with Google+ sign-in. I followed this ( https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins ) tutorial, and can now sign in user my google account. So far so good. How do I restrict access to my application to only users within a certain domain? How do I retrieve the authenticated users roles defined in g-suite? I have tried to add scopes to the authentication options in

Google OAuth 2.0 using Python for GCP BigQuery

混江龙づ霸主 提交于 2021-02-08 09:52:05
问题 I am seeking a code snippet for implementing oAuth 2.0 authentication using python to connect to GCP Big Query service. I am using Google cloud shell to write the python code. But the access token I am receiving bad request. access_token = google.fetch_token(token_url=token_url,client_id=client_id,client_secret=client_secret,authorization_response=redirect_response). Also I need to automate this process so manually pasting the redirect_response needs to be avoided. 回答1: It is recommended that