spring security oauth oauth/token\ key返回404-错误:找不到

nhn9ugyo  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(217)

我正在尝试使用springsecurity构建授权服务器。
代码在git上可用-https://github.com/bharatnpti/springauthserverso
我已经实现了jwt,一切都很好,例如生成令牌,检查令牌。
但是,端点oauth/token\密钥给出错误-404,未找到。
已尝试对令牌密钥进行以下访问:-
tokenkeyaccess(“permitall()| | isanonymous()”)
tokenkeyaccess(“permitall()”)
以下是令牌密钥请求的日志:-
2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/test/oauth/token']2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:检查请求的匹配:'/test/oauth/token_key';对“/test/oauth/token”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/test/oauth/token_key']2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathRequester:检查请求的匹配:“/test/oauth/token_key”;针对“/test/oauth/token\u key”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.web.util.matcher.orrequestmatcher:matched 2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u key,位于附加筛选器链中11的第1位;触发筛选器:“webasyncmanagerintegrationfilter”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u key,位于附加筛选器链中11的第2个位置;触发筛选器:“securitycontextpersistencefilter”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u key位于附加筛选器链中11的第3个位置;触发筛选器:“headerwriterfilter”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u key位于附加筛选器链中11的第4位;触发筛选器:“logoutfilter”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/logout',get]2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:检查请求的匹配:'/test/oauth/token_key';针对“/logout”2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/logout',post]2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:请求'get/test/oauth/token\u key'与'post/logout'2020-12-07 03:22:28.453 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/logout',put]2020-12-07 03:22:28.454 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:请求'get/test/oauth/token\u key'与'put/logout'2020-12-07 03:22:28.454 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher:尝试使用ant[pattern='/logout'进行匹配,delete]2020-12-07 03:22:28.454 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:request'get/test/oauth/token\u key'与'delete/logout'2020-12-07 03:22:28.454 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher:2020-12-07 03:22:28.454 debug 1432---[nio-5555-exec-6]o、 s.security.web.filterchainproxy:/test/oauth/token\u键,位于附加过滤器链中11的第5个位置;触发筛选器:“basicauthenticationfilter”2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.s.w.a。www.basicauthenticationfilter :为用户“1”找到基本身份验证授权标头2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.s.authentication.providermanager:身份验证尝试使用org.springframework.security.authentication.dao.daoauthenticationprovider 2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.s.w.a。www.basicauthenticationfilter :验证成功:org.springframework.security.authentication。usernamepasswordauthenticationtoken@ffff4c91:负责人:org.springframework.security.core.userdetails。user@31:用户名:1;密码:[受保护];启用:真;accountnonexpired:正确;无需证明:真实;accountnonlocked:真;未授予任何权限;凭据:[受保护];认证:真;详细信息:org.springframework.security.web.authentication。webauthenticationdetails@b364:RemoteIP地址:0:0:0:0:0:0:0:0:1;sessionid:null;未授予任何权限2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u key,位于附加筛选器链中11的第6个位置;触发筛选器:“requestcacheawarefilter”2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.s.w.s.httpsessionrequestcache:保存的请求与2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u键在附加筛选器链中的第7位(共11位);触发筛选器:“securitycontextholderawarerequestfilter”2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u键,位于附加筛选器链中11的第8位;触发筛选器:“anonymousauthenticationfilter”2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.s.w.a.anonymousauthenticationfilter:securitycontextholder未填充匿名令牌,因为它已经包含:'org.springframework.security.authentication。usernamepasswordauthenticationtoken@ffff4c91:主体:org.springframework.security.core.userdetails。user@31:用户名:1;密码:[受保护];启用:真;accountnonexpired:正确;无需证明:真实;accountnonlocked:真;未授予任何权限;凭据:[受保护];认证:真;详细信息:org.springframework.security.web.authentication。webauthenticationdetails@b364:RemoteIP地址:0:0:0:0:0:0:0:0:1;sessionid:null;未授予任何机构的2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\u密钥,位于附加筛选器链中11的第9个位置;触发筛选器:“sessionmanagementfilter”2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]s.compositesessionauthenticationstrategy:委派到org.springframework.security.web.authentication.session。changesessionidauthenticationstrategy@cd5ff55 2020-12-07 03:22:28.456调试1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\键位于附加过滤器链中11的第10个位置;触发筛选器:“exceptiontranslationfilter”2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.security.web.filterchainproxy:/test/oauth/token\ key,位于附加筛选器链中11的第11个位置;触发筛选器:“filtersecurityinterceptor”2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.s.w.u.matcher.antpathrequestmatcher:检查请求的匹配:'/test/oauth/token_key';针对“/test/oauth/token”2020-12-07 03:22:28.456 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:检查请求的匹配:“/test/oauth/token_key”;针对“/test/oauth/token\u key”2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o.s.w.a.i.filtersecurityinterceptor:secure object:filterinvocation:url:/test/oauth/token\u key;属性:[permitall()| | isanonymous()]2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o.s.s.w.a.i.filtersecurityinterceptor:先前已验证:org.springframework.security.authentication。usernamepasswordauthenticationtoken@ffff4c91:主体:org.springframework.security.core.userdetails。user@31:用户名:1;密码:[受保护];启用:真;accountnonexpired:正确;无需证明:真实;accountnonlocked:真;未授予任何权限;凭据:[受保护];认证:真;详细信息:org.springframework.security.web.authentication。webauthenticationdetails@b364:RemoteIP地址:0:0:0:0:0:0:0:0:1;sessionid:null;未授予任何权限2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o.s.s.access.vote.affirmativebased:投票者:org.springframework.security.web.access.expression。webexpressionvoter@56707676,返回时间:1 2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o.s.w.a.i.filtersecurityinterceptor:授权成功2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o.s.w.a.i.filtersecurityinterceptor:runasmanager未更改身份验证对象2020-12-07 03:22:28.457 debug 1432---[nio-5555-exec-6]o、 s.security.web.filterchainproxy:/test/oauth/token\u key到达附加过滤链的末尾;继续原始链2020-12-07 03:22:28.459调试1432---[nio-5555-exec-6]o.s.s.w.header.writers.hstsheaderwriter:未注入hsts头,因为它与requestmatcher org.springframework.security.web.header.writers不匹配。hstsheaderwriter$securerequestmatcher@39309083 2020-12-07 03:22:28.460调试1432---[nio-5555-exec-6]o、 s.s.w.a.exceptiontranslationfilter:chain正常处理2020-12-07 03:22:28.461调试1432---[nio-5555-exec-6]s.s.w.c.securitycontextpersistencefilter:securitycontextholder现已清除,请求处理完成时2020-12-07 03:22:28.462 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/test/oauth/token']2020-12-07 03:22:28.462 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathrequestmatcher:检查请求的匹配:'/error';对“/test/oauth/token”2020-12-07 03:22:28.462 debug 1432---[nio-5555-exec-6]o.s.web.util.matcher.orrequestmatcher:尝试使用ant进行匹配[pattern='/test/oauth/token_key']2020-12-07 03:22:28.462 debug 1432---[nio-5555-exec-6]o.s.w.u.matcher.antpathRequester:检查请求的匹配:“/error”;针对“/test/oauth/token\u key”2020-12-07 03:22:28.462 debug 1432---[nio-5555-exec-6]o.s.s.web.util.matcher.orrequestmatcher

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题