authorization

Ajax Authorization Request headers fails again and again

半世苍凉 提交于 2019-12-21 02:36:24
问题 I'm working on a consumer for a self-made API and having serious difficulties with setting the Authorization header . I am using JQuery for the Ajax requests, but the 'beforeSend' does not work at all (using fiddler to examine the requests) This is my beforeSend code: $.ajax({ type: "GET", url: url+"/Projects", contentType: "application/json; charset=utf-8", beforeSend: function (req) { req.setRequestHeader("Authorization", AuthBuilder(username, password)); }, success: function (result) {

OAuth2 - Authorize with no user interaction

你说的曾经没有我的故事 提交于 2019-12-21 01:57:54
问题 So I'm trying to access my own data from an external app via their API. I only need access to my own data . Not trying to receive data from any of my users' accounts, so they don't need to authorize anything. So obviously I need to avoid any redirects (which seems to be the standard process the more I research OAuth...) The process is hit the /authorize endpoint, which returns a code. Then provide that code in a request to the accesstoken endpoint. Which then allows me to access my account

Writing a CherryPy Decorator for Authorization

为君一笑 提交于 2019-12-21 01:18:11
问题 I have a cherrypy application and on some of the views I want to start only allowing certain users to view them, and sending anyone else to an authorization required page. Is there a way I can do this with a custom decorator? I think that would be the most elegant option. Here's a basic example of what I want to do: class MyApp: @authorization_required def view_page1(self,appID): ... do some stuff ... return html def authorization_required(func): #what do I put here? Also can the

IIS 7.5 Windows Authentication Not Working in Chrome

自作多情 提交于 2019-12-20 20:31:32
问题 On a new installation of IIS 7.5 I have setup Windows Authentication on my Intranet. The providers I have used are 'NTLM' and negotiate in that order. This works fine in IE and Firefox but in chrome I get the following This web page is not available The web page at http://mysite.com/myintranet.php might be temporarily down or it may have moved permanently to a new web address. Error 338 (net::ERR_INVALID_AUTH_CREDENTIALS): Unknown error. I've tried looking online for a solution without any

IIS 7.5 Windows Authentication Not Working in Chrome

偶尔善良 提交于 2019-12-20 20:31:03
问题 On a new installation of IIS 7.5 I have setup Windows Authentication on my Intranet. The providers I have used are 'NTLM' and negotiate in that order. This works fine in IE and Firefox but in chrome I get the following This web page is not available The web page at http://mysite.com/myintranet.php might be temporarily down or it may have moved permanently to a new web address. Error 338 (net::ERR_INVALID_AUTH_CREDENTIALS): Unknown error. I've tried looking online for a solution without any

Rails: Authorization with Authlogic

爱⌒轻易说出口 提交于 2019-12-20 14:43:09
问题 I need a very granular authorization system that works seamlessly with Authlogic. I've tried these gems/plugins so far: Lockdown rails_authorization_plugin ACL9 I've also looked at, but not tried implementing: Padlock I've searched around for a good tutorial detailing how to set up any of these with Authlogic in a way that makes sense (only the Lockdown doc seems to outline how to set this up with Authlogic), but have come up with next to nothing. The only one of these that made the remotest

Authorisation in microservices - how to approach domain object or entity level access control using ACL?

女生的网名这么多〃 提交于 2019-12-20 12:28:09
问题 I am currently building microservices based system on java Spring Cloud. Some microservices use PostgreSQL and some of them MongoDB. REST and JMS is used for communication. The plan is to use SSO and OAuth2 for authentication The challenge I am facing is that authorisation have to be done on domain object/entity level. It means some kind of ACL (Access Control List) is needed. The best practice for this kind of architecture is to avoid something like this and have coarse grained security

On Asp.net Web Api authorization filters, how can I access to parameters?

醉酒当歌 提交于 2019-12-20 10:34:56
问题 I'am starting with Asp.Net Web API and here's my problem : I implement a custom authorization filter to inspect my message header looking for an API Key. Based on this API Key, I retrieve my user and then I would like to see if he can have access to some resources. The resources ID I want to check is on the parameters of the HTTP request. But when I'am on the AuthorizationFilter method, the actions parameters list is empty. How can I do that ? If I used an ActionFilter in replacement of an

web site configuration

梦想与她 提交于 2019-12-20 10:24:34
问题 One web site is required to be accessed by me (developer) and one user (DOMAIN_NAME\USER_NAME). When I developed web site in visual studio using "automatic host" created by VS, the following settings in web.config were enough: <authentication mode="Windows"/> <authorization> <allow users="DOMAIN_NAME\my_name,DOMAIN_NAME\USER_NAME" /> <deny users="*" /> </authorization> But when I created web site in IIS I'm receiving error: Access is denied. Description: An error occurred while accessing the

How do I get the current Url from within a FilterAttribute?

白昼怎懂夜的黑 提交于 2019-12-20 10:16:41
问题 I am writing an Authorize filter attribute adn I'm having trouble figuring out how to get the current url as a string so I can pass it as a parameter to the LogOn action. The goal is that if a user successfully logs on, they will be redirected to the page they were originally trying to access. public override void OnAuthorization(AuthorizeContext filterContext) { base.OnAuthorization(filterContext); ... my auth code ... bool isAuth ; ... my auth code ... if(!isAuth) { filterContext.Result =