authorization

How to call Microsoft Graph API using VBA?

坚强是说给别人听的谎言 提交于 2020-07-09 03:44:10
问题 Question Is it possible to call Microsoft Graph API using VBA code? If yes, how to handle O365 authorization? I have seen plenty of topics saying to create an application in Microsoft Azure to get a token but I am surprised I must do that for a simple local use. What I tried After discovering Microsoft Graph, I tried this API in Graph Explorer https://graph.microsoft.com/v1.0/planner/tasks I was able to create a task in planner! Consequently, in my mind, it was possible to call this API from

Login to GKE via service account with token

核能气质少年 提交于 2020-07-03 03:05:10
问题 I am trying to access my Kubernetes cluster on google cloud with the service account, but I am not able to make this works. I have a running system with some pods and ingress. I want to be able to update images of deployments. I would like to use something like this (remotely): kubectl config set-cluster cluster --server="<IP>" --insecure-skip-tls-verify=true kubectl config set-credentials foo --token="<TOKEN>" kubectl config set-context my-context --cluster=cluster --user=foo --namespace

Aspnet Core - web.config Authorization

和自甴很熟 提交于 2020-06-29 06:02:12
问题 I am trying to add "authorization" elements to web.config, like it used to work in classic asp.net: global configuration - should limit access "globally": <configuration> <system.web> <authentication mode="Windows" /> <authorization> <allow roles="AD\some.user" /> <deny users="*" /> </authorization> ... "location" based configuration: <configuration> <location path="RelativePath" > <system.web> <authorization> <allow roles="AD\some.user" /> <deny users="*" /> </authorization> </system.web> <

Can't access Roles in JWT Token .NET Core

蹲街弑〆低调 提交于 2020-06-28 07:51:06
问题 I have an application made with .NET Core API, Keycloak and JWT Token. The older version of Keycloak that I've been using so far, when it created the JWT Token it wrote the roles here on payload: { "user_roles": [ "offline_access", "uma_authorization", "admin", "create-realm" ] } But now after I updated it, it's writing the roles here on payload: { "realm_access": { "roles": [ "create-realm", "teacher", "offline_access", "admin", "uma_authorization" ] }, } And I need to know how to change

Who is responsible to create login form to get accessToken? Authorization server or Angular? [closed]

给你一囗甜甜゛ 提交于 2020-06-23 11:04:19
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last month . Improve this question I am recently learning about OAuth2. Basically I am using Angular client side, and Backend Spring Boot Rest API. I am having some little confusion regarding login form. Normally when we use 3rd party REST Api like Facebook or Google Rest API, these APIs

Django Rest Framework Custom Register View (RegisterView) failing to return token + user data

允我心安 提交于 2020-06-17 12:32:43
问题 I'm using allauth and rest_auth in my django rest framework app. When registering an user a token (key) is returned, what I'm trying to achieve is to return the token + user data after registration. To do so I've the following serializer: from rest_framework import serializers from rest_framework.response import Response from allauth.account import app_settings as allauth_settings from allauth.utils import email_address_exists from allauth.account.adapter import get_adapter from allauth

Dependency Injection on Authorization Policy

久未见 提交于 2020-06-15 21:36:09
问题 I want to create a claim based authorization for my ASP.NET Core app: public void ConfigureServices(IServiceCollection services) { services.AddAuthorization(options => { options.AddPolicy("Founders", policy => policy.RequireClaim("EmployeeNumber", "1", "2", "3", "4", "5")); }); } The problem is that I have a non trivial method to resolve the employee numbers (1 to 5) and I want to use a DI service: public interface IEmployeeProvider { string[] GetAuthorizedEmployeeIds(); } I would like to

Unauthorised client when requesting for token using IdentityServer4 .NET Core 3.1

﹥>﹥吖頭↗ 提交于 2020-06-01 07:39:29
问题 I'm trying to get IdentityServer4 to work but unfortunately no luck. I'll explain the issue in more detail. I'm using IdentityServer4 and also .NET core Identity. I have a .net core mvc application which has login page. You basically login with username and password. When you login I need to generate jwt token I'm doing this using the following code: [HttpGet] public async Task<IActionResult> GetClientToken(string clientId, string clientSecret, string grantType, string scope, string username,

How do you authorize access to a page dealed by a controller without corresponding model with Cancancan?

浪尽此生 提交于 2020-06-01 05:39:29
问题 The issue A Spree admin controller without corresponding model, whose access trial redirect to an other page. The corresponding attempt code: module Spree module Admin class TutorialsController < Spree::Admin::BaseController authorize_resource :class => false def index end end end end And in app/models/spree/ability_decorator.rb the following was added: can :manage, :'tutorial' can :manage, :'admin/tutorial' can :manage, :'admin_tutorial' can :manage, :'spree/admin/tutorial' can :manage, :

Zeit (Vercel) Now serverless authenticated requests failing because of CORS

混江龙づ霸主 提交于 2020-05-29 02:39:11
问题 I'm not able to correctly handle CORS issues when doing either PATCH / POST / PUT requests from the browser sending an Authorization header with a Bearer token (this works correctly outside of the browser and for GET requests) in Zeit Now serverless. I'm using Auth0 for the authorization side if that helps. This is my now.json headers section, I've tried a lot of combinations for these, but neither succeeded from the browser. I tried using npm cors package without success Tried to add routes