草庐IT

authenticationManager

全部标签

java - spring-boot oauth2分离授权服务器和资源服务器

我试图在spring-boot中将资源服务器与授权服务器分开。我有两个不同的应用程序,它们分别运行。在授权服务器中,我可以从oauth/token获取持有者token,但是当我尝试访问资源(在header中发送token)时,我收到无效token错误。我的意图是使用InMemoryTokenStore和不记名token。谁能告诉我我的代码有什么问题?授权服务器:@SpringBootApplicationpublicclassAuthorizationServerextendsWebMvcConfigurerAdapter{publicstaticvoidmain(String[]ar

java - Spring boot 安全配置 - 必须指定 authenticationManager

这是我的主要应用程序配置@SpringBootApplicationpublicclassApplication{publicstaticvoidmain(String[]args){newSpringApplicationBuilder(Application.class).banner((environment,aClass,printStream)->System.out.println(stringBanner())).run();}}这是我的spring安全应用程序配置。@Configuration@EnableGlobalMethodSecurity(prePostEnab

java - Spring 需要一个类型为 'AuthenticationManager' 的 bean

我一直在尝试按照发现的教程进行操作HERE用于设置演示以帮助我在另一个项目中实现之前了解本地计算机上的SSO。我遇到了一个让我陷入困境的问题。我收到错误提示我添加一个bean。请让我知道我缺少什么代码。我无法让程序运行。文件系统树AuthApplication.javapackagecom.spud.auth;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.boot.SpringApplication;importorg.springframework.boot

c# - Google 的间歇性 ASP.NET oAuth 问题,AuthenticationManager.GetExternalIdentityAsync 返回 null

我正在尝试解决使用Google作为外部登录提供商时出现的间歇性问题。尝试登录时,用户将被重定向回登录页面,而不是进行身份验证。问题出现在这一行(下面链接的第55行),GetExternalIdentityAsync返回null。varexternalIdentity=awaitAuthenticationManager.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie);完整代码为:[Authorize]publicabstractclassGoogleAccountController:Control

c# - Google 的间歇性 ASP.NET oAuth 问题,AuthenticationManager.GetExternalIdentityAsync 返回 null

我正在尝试解决使用Google作为外部登录提供商时出现的间歇性问题。尝试登录时,用户将被重定向回登录页面,而不是进行身份验证。问题出现在这一行(下面链接的第55行),GetExternalIdentityAsync返回null。varexternalIdentity=awaitAuthenticationManager.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie);完整代码为:[Authorize]publicabstractclassGoogleAccountController:Control

c# - 如何设置asp.net Identity cookies过期时间

我使用Asp.NetIdentity来控制我的应用程序的授权。现在,我需要做的是:如果用户在30分钟内没有操作,则跳转到登录页面,登录时不勾选“isPersistent”复选框。并且,如果他选中了“isPersistent”复选框,则将cookie的有效期设置为14天。我尝试通过像这样更改Startup.Auth.cs来做到这一点:publicvoidConfigureAuth(IAppBuilderapp){app.UseCookieAuthentication(newCookieAuthenticationOptions{AuthenticationType=DefaultAuth

c# - 如何设置asp.net Identity cookies过期时间

我使用Asp.NetIdentity来控制我的应用程序的授权。现在,我需要做的是:如果用户在30分钟内没有操作,则跳转到登录页面,登录时不勾选“isPersistent”复选框。并且,如果他选中了“isPersistent”复选框,则将cookie的有效期设置为14天。我尝试通过像这样更改Startup.Auth.cs来做到这一点:publicvoidConfigureAuth(IAppBuilderapp){app.UseCookieAuthentication(newCookieAuthenticationOptions{AuthenticationType=DefaultAuth

spring security Ⅲ—— authenticationManager.authenticate()验证流程

1、触发UsernamePasswordAuthenticationFilter    其返回值是一个方法 getAuthenticationManager().authenticate(authRequest) 的返回值//将用户输入封装UsernamePasswordAuthenticationTokenauthenticationToken=newUsernamePasswordAuthenticationToken(userDB.getUsername(),user.getPassword());//调用authenticationManager.authenticate()方法进行验

spring security Ⅲ—— authenticationManager.authenticate()验证流程

1、触发UsernamePasswordAuthenticationFilter    其返回值是一个方法 getAuthenticationManager().authenticate(authRequest) 的返回值//将用户输入封装UsernamePasswordAuthenticationTokenauthenticationToken=newUsernamePasswordAuthenticationToken(userDB.getUsername(),user.getPassword());//调用authenticationManager.authenticate()方法进行验

java - 没有名为 authenticationManager 的 bean

这个问题在这里已经有了答案:关闭9年前。PossibleDuplicate:Gettingerrororg.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed‘springSecurityFilterChain’isdefined在我的Spring应用程序中,我不断收到此错误:Nobeannamed'org.springframework.security.authenticationManager'isdefined:Didyouforgettoaddagobalelementtoyourco