草庐IT

googleapis_auth

全部标签

ruby - Rack::Auth 是否与基本 HTTP 身份验证相同?

我正在使用来自Sinatradocs的以下代码限制对我的Sinatra应用程序设置页面的访问.helpersdodefprotected!unlessauthorized?response['WWW-Authenticate']=%(Basicrealm="Accessrestricted")throw(:halt,[401,"Loginincorrect\n"])endenddefauthorized?@auth||=Rack::Auth::Basic::Request.new(request.env)@auth.provided?&&@auth.basic?&&@auth.cred

ruby-on-rails - 将 devise_token_auth 与表单例份验证一起使用

我试图允许在移动设备上使用token进行身份验证,同时仍将网络表单用于网络应用程序。我决定使用devise_token_auth.每当我尝试启动应用程序时,我都会收到错误消息,因为已经定义了session路径。错误ArgumentError:Invalidroutename,alreadyinuse:'new_provider_session'配置/routes.rbmount_devise_token_auth_for'Provider',at:'api/v1/auth'devise_for:providers,controllers:{}doget'providers/sign_i

php - 在 Auth::attempt() Laravel 5.1 中禁用重定向

我使用Laravel创建RESTAPI。我在登录API中,所以我使用从Laravel构建的AuthController。但是,当我第一次使用Auth::attempt()验证用户登录时,我成功获取了用户信息,因为我调用了此方法Auth::user()。但是,当我第二次再次运行时,出现以下错误:NotFoundHttpExceptioninRouteCollection.phpline161:我知道如果用户已通过身份验证,它会自动发送重定向。并保存session。这是我在AuthController.php中的登录代码publicfunctiondemo(){if(Auth::attem

ios - 无权执行 sts :AssumeRoleWithWebIdentity AWS s3 Cognito auth failure

我有一个上传到s3的简单iOS应用程序。我正在尝试unauth所有-尽管理想情况下我想做Facebook。2个IAM角色(使用向导创建)。IAM身份验证策略(针对未授权角色):{"Version":"2012-10-17","Statement":[{"Action":["mobileanalytics:PutEvents","cognito-sync:*"],"Effect":"Allow","Resource":["*"]},{"Effect":"Allow","Action":["s3:PutObject","s3:GetObject","s3:DeleteObject"],"R

ios - 为什么我的 Auth0 token 从 iOS 发送到 node.js 服务器时总是返回无效?

我在iOS应用程序中使用Auth0的服务,服务器基于node.js和express.js构建。我已尽我所能关注Auth0的文档和种子项目,但服务器一直提示我从我的iOS应用程序发送的token无效。这是我的一些代码:来自服务器-身份验证和路由声明,如Auth0documentation中指定varauthenticate=jwt({secret:newBuffer(process.env.AUTH0_CLIENT_SECRET,'base64'),audience:process.env.AUTH0_CLIENT_ID});app.use('/api',authenticate);ap

java - 如何在jsp中为spring security auth异常显示自定义错误消息

我想在jsp中为springsecurity认证异常显示自定义错误信息。用户名或密码错误,springdisplays:BadcredentialswhatIneed:Username/Passwordenteredisincorrect.对于被禁用的用户,springdisplays:UserisdisabledwhatIneed:Youraccountisdiabled,pleasecontactadministrator.我是否需要为此重写AuthenticationProcessingFilter?否则我可以在jsp本身中做一些事情来查找身份验证异常key并显示不同的消息

java - 如何在jsp中为spring security auth异常显示自定义错误消息

我想在jsp中为springsecurity认证异常显示自定义错误信息。用户名或密码错误,springdisplays:BadcredentialswhatIneed:Username/Passwordenteredisincorrect.对于被禁用的用户,springdisplays:UserisdisabledwhatIneed:Youraccountisdiabled,pleasecontactadministrator.我是否需要为此重写AuthenticationProcessingFilter?否则我可以在jsp本身中做一些事情来查找身份验证异常key并显示不同的消息

iphone - 将 django.contrib.auth.views.login 设置为 csrf_exempt

我正在开发一个与我的Django应用程序交互的学习型iOS应用程序。我在登录部分:由于csrf保护,我的客户端无法登录Django应用。对于其他View,我只是添加csrf_exempt装饰器来禁用它,但对于内置的django.contrib.auth.views.login? 最佳答案 在现代Django(最后测试于1.11)中,禁用CSRF检查的一种方法是子类化LoginView并覆盖其dispatch方法,该方法显式装饰有csrf_protect(asseenhere)。生成的CBV如下:fromdjango.contrib.

python - 在 iOS 上使用 Django-social-auth 和 tastypie 登录

我正在使用tastypie为iOS应用构建API。我可以很好地处理正常的身份验证/授权,但在使用django-social-auth通过Tastypie注册/登录/链接时我有点困惑。例如,如果我想使用django-social-auth和tastypie在iOS应用程序上验证或注册用户,我该怎么做?有什么建议么?我是不是看错了? 最佳答案 你不能直接使用django-social-auth。要登录Facebook,您需要使用适用于iOS的FacebookSDK(https://developers.facebook.com/docs

ios - 是否可以使用OAuth & Twitter Reverse-Auth 传递OAuth Token 和Token Secret?

我项目这部分的最终目标是能够不使用Twitter的服务器,而是使用我自己的网络平台对移动设备进行身份验证。两者都使用Twitter进行身份验证,我想避免将我的Twitter应用程序“secret”硬编码到我的iOS应用程序中。这是我正在考虑实现的内容:MobileDevice:使用Twitter的ReverseAuth,获取OAuthToken和OAuthTokenSecret将这两个值传递给网络平台Web平台:生成一个不可逆的加密总和并存储在数据库中作为移动客户端和服务器之间共享的“secret”将这个secret回传给移动客户端,并保存在移动设备上从现在开始,每次移动设备使用网络平