authorization

Get Google authorization from java program open browser for asking already given permission

狂风中的少年 提交于 2019-12-24 01:59:06
问题 In order for a java program to access my google drive I need to create an oauth2.Credential using a json credential file (see https://console.developers.google.com) for getting an access token. The problem is when I create the Credential java instance the java program open Internet Explorer and ask permission for Drive. Credential credential = new AuthorizationCodeInstalledApp(flow , new LocalServerReceiver()) .authorize("user") ; If I click button "allow" , Credential is created and I get a

What is Webform's “UrlAuthorizationModule.CheckUrlAccessForPrincipal” equivalent for MVC?

最后都变了- 提交于 2019-12-24 01:53:59
问题 I got a problem as i am writing a custom SSO solution for my company. To mkae it simple, i've made a custom authentication httpmodule that intercepts all requests so as to check user authentication state. If not authenticated, user is redirected to my custom sso login page. The thing is, when user is not authenticated, i'd like to check if he can access the requested page/resource... With Webforms, no problem, i add an authorization block in web.config, and i use UrlAuthorizationModule

Detect file copying from kernel extension

岁酱吖の 提交于 2019-12-24 01:16:15
问题 I'm trying to build POC that identify file copying activity from kauth based kernel extension that using fileop scope callback. However, it seems that copying file involves two separate authentication operations (open src file from and create new file). My goal is rather simple, detect the new target file creation after it was filled with data, disregarding the nature of the source file (so I'll be able to read it for further analysis) According to my observation, it may possible to achieve

Using ASP.NET Role Authorisation with IdentityServer3 implicit flow

不羁的心 提交于 2019-12-24 00:59:22
问题 My single page application uses OidcTokenManager to connect to an IdentityServer3 STS using implicit flow. The client presents the IDS3 access token to a ASP.NET Core (WebApi) web service as a Bearer Token; the web service application is configured to use IDS3 middleware and restricts access to its methods using an Authorize attribute. SPA client configuration: function configureTokenManager() { console.log("configureTokenManager()"); var config = { authority: $config.authority, client_id:

Handle Authorization in GWT application

大兔子大兔子 提交于 2019-12-24 00:58:19
问题 I am planing to use JAAS for authorization purpose. I am using GWT on GUI side and Java on server side. Please suggest some code to handle authorization using JAAS. Does it has support for GWT?. Is there any way to control disable and enable button using JAAS? Does any library available to handle authorization for GWT appliation?. 回答1: AFAIK there is no library in GWT that handles authorization. That's also not really straightforward as authorization is mainly handled on the backend and there

HttpWebRequest 401 with NTLM Authenticiation

瘦欲@ 提交于 2019-12-23 23:06:29
问题 I am having difficulties authenticating a HttpWebRequest to a webserver. The response I am receiving is simply a 401. I've made sure I set the credentials correctly on the C# side, and IIS is correctly set to allow NTLM authentication. I don't know if this matters, but he computer is not on the same domain as the the web server. I am sure the user/pass is correct but are there any other authorization settings needed to configure on the user? If I enable Basic authentication, and disable

How to correctly setup Policy Authorization for WEB API in .NET Core

让人想犯罪 __ 提交于 2019-12-23 23:01:49
问题 I have this Web API project, with no UI. My appsettings.json file has a section listing tokens and which client they belong to. So the client will need to just present a matching token in the header. If no token is presented or an invalid one, then it should be returning a 401. In ConfigureServices I setup authorization .AddTransient<IAuthorizationRequirement, ClientTokenRequirement>() .AddAuthorization(opts => opts.AddPolicy(SecurityTokenPolicy, policy => { var sp = services

SVN Show Log not working

ⅰ亾dé卋堺 提交于 2019-12-23 22:25:41
问题 How can I use the show log feature without setting [/] * = r (reads to everyone/everything). I have a couple of groups in my authz file. It Looks like this: [groups] Profs = dave,bruno,franck Team1 = 1036091,1036103,1036087 Team2 = 1016059,1016077 [/GSS] @Team1 = rw [/Booking] @Team2 = rw [/] @Profs = rw When I add [/] * = r in the file, the show log feature works. But that gives access to everyone on all the repositories. This related question has not been answered. 回答1: I experienced

Is it possible to combine the “get token” and “get userinfo” step into one?

对着背影说爱祢 提交于 2019-12-23 20:16:01
问题 In Authorization Code Flow, a client normally gets id token and access token in one step, and then passes the access token to the userinfo endpoint to get the actual data in a second step. In terms of the OpenID Connect, is it possible to combine those steps into one, so one roundtrip from client to OpenID provider suffices? N.B. The actual content of the Access Token is up to the implementor of an OpenID provider, so in theory I could put the data in there - but that does not seem like good

rails: put and interruption in before filter

喜你入骨 提交于 2019-12-23 19:21:20
问题 I want a before filter like "must_have_permission_to_write" that when called if user hasn't permission to write renders a message saying "you can't do that!" and return. Problem is I'm getting "can only render or redirect once per action" of course... how can I stop the execution in the before filter? thanks 回答1: I think the easiest answer is add a redirect and return false to your must_have_permission_to_write method. def must_have_permission_to_write unless current_user.has_permission?