com.atlassian.confluence.rest.client.authentication
Class AuthenticatedWebResourceProvider
java.lang.Object
com.atlassian.confluence.rest.client.authentication.AuthenticatedWebResourceProvider
@ExperimentalApi
public class AuthenticatedWebResourceProvider
- extends java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticatedWebResourceProvider
public AuthenticatedWebResourceProvider(com.sun.jersey.api.client.Client client,
java.lang.String baseUrl)
newRestWebResource
public com.sun.jersey.api.client.WebResource newRestWebResource()
setAuthContext
public void setAuthContext(java.lang.String username,
char[] password)
- Authenticates a user to make remote requests with.
- Parameters:
username
- the login username of the userpassword
- the password of the user
clearAuthContext
public void clearAuthContext()
- Clears the current authenticated user, if any.
getUsername
public java.lang.String getUsername()
Copyright © 2003-2014 Atlassian. All Rights Reserved.