Changeset 5974 for ComponentRegistry
- Timestamp:
- 02/12/15 14:53:18 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/AuthenticationRestService.java
r5973 r5974 2 2 3 3 import clarin.cmdi.componentregistry.AuthenticationRequiredException; 4 import clarin.cmdi.componentregistry.Co nfiguration;4 import clarin.cmdi.componentregistry.ComponentRegistryFactory; 5 5 import clarin.cmdi.componentregistry.UserCredentials; 6 6 import clarin.cmdi.componentregistry.impl.database.ValidationException; … … 38 38 39 39 private final Logger logger = LoggerFactory.getLogger(AuthenticationRestService.class); 40 40 41 41 @Context 42 42 private SecurityContext security; 43 43 @Context 44 44 private UriInfo uriInfo; 45 45 46 46 @GET 47 47 @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) … … 50 50 final Principal userPrincipal = security.getUserPrincipal(); 51 51 52 if (userPrincipal == null ) {52 if (userPrincipal == null || ComponentRegistryFactory.ANONYMOUS_USER.equals(userPrincipal.getName())) { 53 53 return new AuthenticationInfo(false); 54 54 } else { … … 65 65 public Response triggerAuthenticationRequest() { 66 66 logger.debug("Client has triggered authentication request"); 67 67 68 68 //done - redirect to front end 69 69 final URI frontEndUri = uriInfo.getBaseUri().resolve("..");
Note: See TracChangeset
for help on using the changeset viewer.