authorization

Where should I plugin the Authorization in Asp.net WebAPI?

蓝咒 提交于 2019-12-17 21:48:10
问题 As I see I have 3 possible places to plug my stuff in the pipeline 1) AuthorizationFilters 2) Action Filters 3) DelegatingHandler The most obvious one is AuthorizationFilters , where I can decorate my actions/ controllers with my custom authorization attribute . say .. MyCustomAuthorizationAttribute . Since HTTP message handlers are in the first stage in the processing pipeline. Does it make any sense to put it in there ? Authorization for me right now simply means checking a token in the

Can't access S3 Pre-Signed URL due to authorization [duplicate]

久未见 提交于 2019-12-17 21:29:54
问题 This question already has answers here : The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256 (13 answers) Closed 3 years ago . Using Java8 and aws-java-sdk 1.10.43 I'm trying to get a Pre-Signed URL to an S3 file. I do get back a link, but browsing to it lead to this error: authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256 To emphasize, I wish to generate a URL that can be sent via email and opened in a browser, not

Problem with Authorization with IIS and MVC

左心房为你撑大大i 提交于 2019-12-17 21:11:19
问题 Got some problem with settings up the Authorization. First i got : <authorization> <deny users="?" /> </authorization> So i deny all unknown users and then allow them to view those pages: <location path="Default.aspx"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location> <location path="Public"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location> Now to the problem .. they can access the Public pages and Default

Angular route async authorization

拈花ヽ惹草 提交于 2019-12-17 20:46:23
问题 Angular doesn't provide any authorization/access permission on routing (I'm talking default Angular route 1.x and not beta 2.0 or UI route). But I do have to implement it. The problem I'm having is that I have a service that calls server to provide this info and returns a promise. This data however is only obtained once and then cached on the client, but it still needs to be obtained once. I would now like to handle $routeChangeStart event that checks whether next route defines a particular

ASP.NET Core 2.1 Identity: Role-based authorization -> Access Denied

懵懂的女人 提交于 2019-12-17 19:51:46
问题 I'm using ASP.NET Core 2.1 with the new Identity framwork from .NET. The regular Authorization attribute works as long as no role specific role is requested. Do I need some extending / customized policies to use roles? Below is a minimized sample of my code: Startup.cs public void ConfigureServices(IServiceCollection services) { services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options

c# check if the user member of a group?

本秂侑毒 提交于 2019-12-17 18:57:14
问题 I have a code that I use to check if the user is member of the AD, worked perfectly, now I want to add the possibility to check if the user also a member of a group! what do I need to modify to achieve that, I did some work, but it fails! so here is my code: //Authenticate a User Against the Directory private bool Authenticate(string userName,string password, string domain) { if (userName == "" || password == "") { return false; } bool authentic = false; try { DirectoryEntry entry = new

Is it possible to use bearer authentication for websocket upgrade requests?

感情迁移 提交于 2019-12-17 18:51:34
问题 The upgrade request for opening a websocket connection is a standard HTTP request. On the server side, I can authenticate the request like any other. In my case, I would like to use Bearer authentication. Unfortunately, there is no way to specify headers when opening a websocket connection in the browser, which would lead me to believe that it's impossible to use bearer authentication to authenticate a web socket upgrade request. So -- Am I missing something, or is it really impossible? If it

How to authorize Facebook app using redirect in canvas?

心不动则不痛 提交于 2019-12-17 17:59:09
问题 I'm trying to get into making Facebook apps but I'm having trouble getting authorization working in a redirect scheme inside the canvas. Using the javascript api, I got it working pretty easily in a popup scheme: $("#loginButton").click(function(e) { FB.login(function(response) { if (response.perms) { perms(); } }, {perms : 'publish_stream'}); But the popup should be an unnecessary extra click, because every other application I see requests the authorization before even showing you the

HTTP POST request with authorization on android

邮差的信 提交于 2019-12-17 17:34:47
问题 When I set "Authorization" header with setHeader from HttpPost then hostname disappears from request and there is always error 400 (bad request) returned. Same code is working fine on pure java (without android) and when I remove setting "Authorization" header also on android it works fine, but I need authorization. This is a code (domain changed): HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost("http://myhost.com/test.php"); post.setHeader("Accept", "application

Connecting TeamCity to TFS [duplicate]

心已入冬 提交于 2019-12-17 16:37:44
问题 This question already has answers here : Connect TeamCity to Visual Studio Online (4 answers) Closed 3 years ago . I'm struggling trying to connect my TeamCity project to my TFS project. I tried a bunch of stuff, but I always get the same error: TFS failed. ExitCode: 111, command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe @@C:\TeamCity\temp\TC-TFS-25-7939_109\command.params, in file: {https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity, /hash:S, /noProxy,