|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.rest.client.authentication.AuthenticatedWebResourceProvider
@ExperimentalApi public class AuthenticatedWebResourceProvider
Provides authenticated WebResource
s for Remote API clients.
Clients should call setAuthContext(String, char[])
to set the active user before making remote requests,
and clearAuthContext()
when the user authentication is no longer needed.
Constructor Summary | |
---|---|
AuthenticatedWebResourceProvider(com.sun.jersey.api.client.Client client,
String baseUrl,
String path)
|
Method Summary | |
---|---|
void |
clearAuthContext()
Clears the current authenticated user, if any. |
String |
getUsername()
|
com.sun.jersey.api.client.WebResource.Builder |
newJsonResource(String path)
Returns a new web resource accepting JSON. |
com.sun.jersey.api.client.WebResource |
newRestWebResource()
|
void |
setAuthContext(String username,
char[] password)
Authenticates a user to make remote requests with. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticatedWebResourceProvider(com.sun.jersey.api.client.Client client, String baseUrl, String path)
Method Detail |
---|
public com.sun.jersey.api.client.WebResource newRestWebResource()
public com.sun.jersey.api.client.WebResource.Builder newJsonResource(String path)
public void setAuthContext(String username, char[] password)
username
- the login username of the userpassword
- the password of the userpublic void clearAuthContext()
public String getUsername()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |