OAuthNetworkCredential
Inheritance: java.lang.Object, com.aspose.ms.System.Net.NetworkCredential
All Implemented Interfaces: com.aspose.ms.System.Net.ICredentialsByHost
public class OAuthNetworkCredential extends System.Net.NetworkCredential implements System.Net.ICredentialsByHost
Represents the NetworkCredential for OAuth authentication.
Constructors
Constructor | Description |
---|---|
OAuthNetworkCredential(String accessToken) | Initializes a new instance of the OAuthNetworkCredential class |
OAuthNetworkCredential(ITokenProvider tokenProvider) | Initializes a new instance of the OAuthNetworkCredential class |
OAuthNetworkCredential(String userName, String accessToken) | Initializes a new instance of the OAuthNetworkCredential class |
OAuthNetworkCredential(String userName, ITokenProvider tokenProvider) | Initializes a new instance of the OAuthNetworkCredential class |
Methods
OAuthNetworkCredential(String accessToken)
public OAuthNetworkCredential(String accessToken)
Initializes a new instance of the OAuthNetworkCredential class
Parameters:
Parameter | Type | Description |
---|---|---|
accessToken | java.lang.String | Access token |
OAuthNetworkCredential(ITokenProvider tokenProvider)
public OAuthNetworkCredential(ITokenProvider tokenProvider)
Initializes a new instance of the OAuthNetworkCredential class
Parameters:
Parameter | Type | Description |
---|---|---|
tokenProvider | ITokenProvider | Token provider |
OAuthNetworkCredential(String userName, String accessToken)
public OAuthNetworkCredential(String userName, String accessToken)
Initializes a new instance of the OAuthNetworkCredential class
Parameters:
Parameter | Type | Description |
---|---|---|
userName | java.lang.String | User name |
accessToken | java.lang.String | Access token |
OAuthNetworkCredential(String userName, ITokenProvider tokenProvider)
public OAuthNetworkCredential(String userName, ITokenProvider tokenProvider)
Initializes a new instance of the OAuthNetworkCredential class
Parameters:
Parameter | Type | Description |
---|---|---|
userName | java.lang.String | User name |
tokenProvider | ITokenProvider | Token provider |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAccessToken()
public final String getAccessToken()
Gets OAuth 2.0 access token.
Returns: java.lang.String
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCredential(System.Uri uri, String authType)
public System.Net.NetworkCredential getCredential(System.Uri uri, String authType)
Parameters:
Parameter | Type | Description |
---|---|---|
uri | com.aspose.ms.System.Uri | |
authType | java.lang.String |
Returns: com.aspose.ms.System.Net.NetworkCredential
getCredential(String host, int port, String authenticationType)
public final System.Net.NetworkCredential getCredential(String host, int port, String authenticationType)
Parameters:
Parameter | Type | Description |
---|---|---|
host | java.lang.String | |
port | int | |
authenticationType | java.lang.String |
Returns: com.aspose.ms.System.Net.NetworkCredential
getDomain()
public String getDomain()
Returns: java.lang.String
getPassword()
public String getPassword()
Returns: java.lang.String
getTokenProvider()
public final ITokenProvider getTokenProvider()
Gets the token provider.
Returns: ITokenProvider
getUserName()
public String getUserName()
Returns: java.lang.String
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setDomain(String value)
public void setDomain(String value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setPassword(String value)
public void setPassword(String value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setUserName(String value)
public void setUserName(String value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |