Changeset 5973 for ComponentRegistry
- Timestamp:
- 02/12/15 14:35:05 (9 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java
r5972 r5973 16 16 import clarin.cmdi.componentregistry.impl.database.GroupService; 17 17 import clarin.cmdi.componentregistry.impl.database.ValidationException; 18 import clarin.cmdi.componentregistry.model.AuthenticationInfo;19 18 import clarin.cmdi.componentregistry.model.BaseDescription; 20 19 import clarin.cmdi.componentregistry.model.Comment; … … 71 70 import javax.ws.rs.core.UriInfo; 72 71 import javax.xml.bind.JAXBException; 73 import org.json.JSONException;74 import org.json.JSONObject;75 72 76 73 import org.slf4j.Logger; … … 1999 1996 } 2000 1997 } 2001 2002 @GET 2003 @Path("/authentication") 2004 @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) 2005 @ApiOperation(value = "Information on the current authentication state") 2006 public AuthenticationInfo getAuthenticationInformation() throws JSONException, AuthenticationRequiredException { 2007 final Principal userPrincipal = security.getUserPrincipal(); 2008 2009 if (userPrincipal == null) { 2010 return new AuthenticationInfo(false); 2011 } else { 2012 return new AuthenticationInfo(getUserCredentials(userPrincipal)); 2013 } 2014 } 1998 2015 1999 } -
ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main/webapp/WEB-INF/shhaa.xml
r5871 r5973 35 35 36 36 <authorization> 37 <location target="/admin/*" /> 37 <location target="/admin/*" /> 38 <location target="/rest/authentication" methods="POST" /> 38 39 </authorization> 39 40
Note: See TracChangeset
for help on using the changeset viewer.