草庐IT

Mongoose-auth

全部标签

java - 向 Spring OAuth2 Auth Server 添加多个客户端

我有SpringOAuth授权服务器,我想添加对多个客户端(id)的支持。我这样配置客户端:clients.inMemory().withClient(client).secret(clientSecret).resourceIds(resourceId).authorizedGrantTypes("client_credentials","password","refresh_token","implicit","authorization_code").authorities("ROLE_USER").scopes("read","write").autoApprove(true)

java - 向 Spring OAuth2 Auth Server 添加多个客户端

我有SpringOAuth授权服务器,我想添加对多个客户端(id)的支持。我这样配置客户端:clients.inMemory().withClient(client).secret(clientSecret).resourceIds(resourceId).authorizedGrantTypes("client_credentials","password","refresh_token","implicit","authorization_code").authorities("ROLE_USER").scopes("read","write").autoApprove(true)

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

javascript - 使用空子文档集合保存 Mongoose 文档会导致重复键错误

我有两个Mongoose模式:varproductSchema=newSchema({name:{type:String,required:true,unique:true},...});...varcategorySchema=newSchema({...products:[ProductSchema]});当我尝试保存类别时varcategories=[{...,products:[]},{...,products:[]}];甚至没有产品varcategories=[{...},{...}];我遇到了错误{[MongoError:E11000duplicatekeyerrorind

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并显示不同的消息