public abstract class AbstractServiceWithRepoToRepoAuth extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
repositoryName |
protected javax.servlet.http.HttpServletRequest |
request |
| Constructor and Description |
|---|
AbstractServiceWithRepoToRepoAuth() |
| Modifier and Type | Method and Description |
|---|---|
protected RepoTransport |
authenticateAndCreateLocalRepoTransport() |
protected URL |
authenticateAndGetLocalRootURL() |
protected String |
authenticateAndReturnUserName()
|
protected Auth |
getAuth()
Get the authentication information.
|
protected UUID |
getClientRepositoryIdFromUserName(String userName) |
protected UUID |
getClientRepositoryIdFromUserNameOrFail(String userName) |
protected URL |
getLocalRootURL(UUID clientRepositoryId) |
@Context protected javax.servlet.http.HttpServletRequest request
@PathParam(value="repositoryName") protected String repositoryName
public AbstractServiceWithRepoToRepoAuth()
protected Auth getAuth() throws javax.ws.rs.WebApplicationException
WebApplicationException with Response.Status.UNAUTHORIZED or Response.Status.FORBIDDEN.
If it did, it extracts the information and puts it into an Auth instance.Auth instance extracted from the client's headers. Never null.javax.ws.rs.WebApplicationException - with Response.Status.UNAUTHORIZED, if the client did not send an 'Authorization' header;
with Response.Status.FORBIDDEN, if there is an 'Authorization' header, but no 'Basic' authentication header (other authentication modes, like e.g. 'Digest'
are not supported).protected String authenticateAndReturnUserName() throws javax.ws.rs.WebApplicationException
Auth information via getAuth(); never null.javax.ws.rs.WebApplicationException - with Response.Status.UNAUTHORIZED, if the client did not send an 'Authorization' header
or if user-name / password is wrong;
with Response.Status.FORBIDDEN, if there is an 'Authorization' header, but no 'Basic' authentication header (other authentication modes, like e.g. 'Digest'
are not supported); with Response.Status.INTERNAL_SERVER_ERROR, if there was an IOException.protected UUID getClientRepositoryIdFromUserName(String userName)
protected UUID getClientRepositoryIdFromUserNameOrFail(String userName)
protected RepoTransport authenticateAndCreateLocalRepoTransport()
protected URL authenticateAndGetLocalRootURL()
protected URL getLocalRootURL(UUID clientRepositoryId)
Copyright © 2013-2014. All Rights Reserved.