Jhipster:未经授权:访问此资源需要完全身份验证

时间:2018-06-14 05:09:58

标签: jhipster

我已将jhipster app从4.13.1升级到4.14.4。然后尝试从UI创建数据库条目并获得以下异常。

Failed to load resource: the server responded with a status of 401 (Unauthorized)

030/api/portals:1 Failed to load resource: the server responded with a status of 401 (Unauthorized)

2018-06-14 10:27:43.393 DEBUG 24184 --- [  XNIO-2 task-9] c.i.portal.aop.logging.LoggingAspect     : Enter: com.infosysapps.portal.web.rest.ProfileInfoResource.getActiveProfiles() with argument[s] = []
2018-06-14 10:27:43.394 DEBUG 24184 --- [  XNIO-2 task-9] c.i.portal.aop.logging.LoggingAspect     : Exit: com.infosysapps.portal.web.rest.ProfileInfoResource.getActiveProfiles() with result = com.infosysapps.portal.web.rest.ProfileInfoResource$ProfileInfoVM@1c7924a5
2018-06-14 10:27:43.967 DEBUG 24184 --- [ XNIO-2 task-11] c.i.portal.aop.logging.LoggingAspect     : Enter: org.springframework.boot.actuate.audit.AuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=Thu Jun 14 10:27:43 IST 2018, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]
2018-06-14 10:27:43.970 DEBUG 24184 --- [ XNIO-2 task-11] c.i.portal.aop.logging.LoggingAspect     : Exit: org.springframework.boot.actuate.audit.AuditEventRepository.add() with result = null
2018-06-14 10:27:43.971  WARN 24184 --- [ XNIO-2 task-11] o.z.p.spring.web.advice.AdviceTrait      : Unauthorized: Full authentication is required to access this resource
2018-06-14 10:27:43.974  WARN 24184 --- [ XNIO-2 task-11] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource
2018-06-14 10:29:42.817 DEBUG 24184 --- [ XNIO-2 task-15] c.i.portal.aop.logging.LoggingAspect     : Enter: com.infosysapps.portal.web.rest.UserJWTController.authorize() with argument[s] = [LoginVM{username='admin', rememberMe=null}]
2018-06-14 10:29:42.830 DEBUG 24184 --- [ XNIO-2 task-15] c.i.p.security.DomainUserDetailsService  : Authenticating admin
Hibernate: select user0_.id as id1_6_0_, authority2_.name as name1_2_1_, user0_.created_by as created_2_6_0_, user0_.created_date as created_3_6_0_, user0_.last_modified_by as last_mod4_6_0_, user0_.last_modified_date as last_mod5_6_0_, user0_.activated as activate6_6_0_, user0_.activation_key as activati7_6_0_, user0_.email as email8_6_0_, user0_.first_name as first_na9_6_0_, user0_.image_url as image_u10_6_0_, user0_.lang_key as lang_ke11_6_0_, user0_.last_name as last_na12_6_0_, user0_.login as login13_6_0_, user0_.password_hash as passwor14_6_0_, user0_.reset_date as reset_d15_6_0_, user0_.reset_key as reset_k16_6_0_, authoritie1_.user_id as user_id1_7_0__, authoritie1_.authority_name as authorit2_7_0__ from jhi_user user0_ left outer join jhi_user_authority authoritie1_ on user0_.id=authoritie1_.user_id left outer join jhi_authority authority2_ on authoritie1_.authority_name=authority2_.name where user0_.email=?
Hibernate: select user0_.id as id1_6_0_, authority2_.name as name1_2_1_, user0_.created_by as created_2_6_0_, user0_.created_date as created_3_6_0_, user0_.last_modified_by as last_mod4_6_0_, user0_.last_modified_date as last_mod5_6_0_, user0_.activated as activate6_6_0_, user0_.activation_key as activati7_6_0_, user0_.email as email8_6_0_, user0_.first_name as first_na9_6_0_, user0_.image_url as image_u10_6_0_, user0_.lang_key as lang_ke11_6_0_, user0_.last_name as last_na12_6_0_, user0_.login as login13_6_0_, user0_.password_hash as passwor14_6_0_, user0_.reset_date as reset_d15_6_0_, user0_.reset_key as reset_k16_6_0_, authoritie1_.user_id as user_id1_7_0__, authoritie1_.authority_name as authorit2_7_0__ from jhi_user user0_ left outer join jhi_user_authority authoritie1_ on user0_.id=authoritie1_.user_id left outer join jhi_authority authority2_ on authoritie1_.authority_name=authority2_.name where user0_.login=?
2018-06-14 10:29:43.702 DEBUG 24184 --- [ XNIO-2 task-15] c.i.portal.aop.logging.LoggingAspect     : Enter: org.springframework.boot.actuate.audit.AuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=Thu Jun 14 10:29:43 IST 2018, principal=admin, type=AUTHENTICATION_SUCCESS, data={}]]
Hibernate: select nextval ('hibernate_sequence')
2018-06-14 10:29:43.760 DEBUG 24184 --- [ XNIO-2 task-15] c.i.portal.aop.logging.LoggingAspect     : Exit: org.springframework.boot.actuate.audit.AuditEventRepository.add() with result = null
Hibernate: insert into jhi_persistent_audit_event (event_date, event_type, principal, event_id) values (?, ?, ?, ?)
2018-06-14 10:29:44.050 DEBUG 24184 --- [ XNIO-2 task-15] c.i.portal.aop.logging.LoggingAspect     : Exit: com.infosysapps.portal.web.rest.UserJWTController.authorize() with result = <200 OK,com.infosysapps.portal.web.rest.UserJWTController$JWTToken@3583987e,{Authorization=[Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImF1dGgiOiJST0xFX0FETUlOLFJPTEVfVVNFUiIsImV4cCI6MTUyOTAzODc4M30.TMfZWnqfUqgxER7QfAkMixXfz3EYUil-qi24xZytuFoV2RM0qgsDGZPpDR4WepBgFQxnXKv6WLeGS-1zXNBvQQ]}>
2018-06-14 10:29:44.104 DEBUG 24184 --- [ XNIO-2 task-16] c.i.portal.aop.logging.LoggingAspect     : Enter: com.infosysapps.portal.web.rest.AccountResource.getAccount() with argument[s] = []
2018-06-14 10:29:44.139 DEBUG 24184 --- [ XNIO-2 task-16] c.i.portal.aop.logging.LoggingAspect     : Enter: com.infosysapps.portal.service.UserService.getUserWithAuthorities() with argument[s] = []
2018-06-14 10:29:44.171 DEBUG 24184 --- [ XNIO-2 task-16] c.i.portal.aop.logging.LoggingAspect     : Exit: com.infosysapps.portal.service.UserService.getUserWithAuthorities() with result = Optional[User{login='admin', firstName='Administrator', lastName='Administrator', email='admin@localhost', imageUrl='', activated='true', langKey='en', activationKey='null'}]
2018-06-14 10:29:44.179 DEBUG 24184 --- [ XNIO-2 task-16] c.i.portal.aop.logging.LoggingAspect     : Exit: com.infosysapps.portal.web.rest.AccountResource.getAccount() with result = UserDTO{login='admin', firstName='Administrator', lastName='Administrator', email='admin@localhost', imageUrl='', activated=true, langKey='en', createdBy=system, createdDate=2018-06-12T07:17:54.464369Z, lastModifiedBy='system', lastModifiedDate=null, authorities=[ROLE_USER, ROLE_ADMIN]}
2018-06-14 10:29:46.843 DEBUG 24184 --- [  XNIO-2 task-1] c.i.portal.aop.logging.LoggingAspect     : Enter: org.springframework.boot.actuate.audit.AuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=Thu Jun 14 10:29:46 IST 2018, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]
2018-06-14 10:29:46.844 DEBUG 24184 --- [  XNIO-2 task-1] c.i.portal.aop.logging.LoggingAspect     : Exit: org.springframework.boot.actuate.audit.AuditEventRepository.add() with result = null
2018-06-14 10:29:46.845  WARN 24184 --- [  XNIO-2 task-1] o.z.p.spring.web.advice.AdviceTrait      : Unauthorized: Full authentication is required to access this resource
2018-06-14 10:29:46.847  WARN 24184 --- [  XNIO-2 task-1] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource
2018-06-14 10:30:00.899 DEBUG 24184 --- [  XNIO-2 task-2] c.i.portal.aop.logging.LoggingAspect     : Enter: org.springframework.boot.actuate.audit.AuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=Thu Jun 14 10:30:00 IST 2018, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]
2018-06-14 10:30:00.900 DEBUG 24184 --- [  XNIO-2 task-2] c.i.portal.aop.logging.LoggingAspect     : Exit: org.springframework.boot.actuate.audit.AuditEventRepository.add() with result = null
2018-06-14 10:30:00.903  WARN 24184 --- [  XNIO-2 task-2] o.z.p.spring.web.advice.AdviceTrait      : Unauthorized: Full authentication is required to access this resource
2018-06-14 10:30:00.906  WARN 24184 --- [  XNIO-2 task-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource

0 个答案:

没有答案