Class Challenge
- java.lang.Object
-
- com.avaya.clientservices.credentials.Challenge
-
public class Challenge extends java.lang.ObjectObject used with aCredentialProviderto determine which Credentials to use for authentication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChallenge.AuthorizationMethod
-
Constructor Summary
Constructors Constructor Description Challenge(java.lang.String realm, java.lang.String host, java.lang.String location, boolean usernamePasswordSupported, boolean hashCredentialSupported, boolean PortalUserTokenSupported, boolean authTokenSupported, int failureCount, int requestId, java.util.Map<Challenge.AuthorizationMethod,java.util.List<java.lang.String>> realmsMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetFailureCount()java.lang.StringgetHost()java.net.URIgetLocation()Get location of authorization resource associated with auth token challenge.java.lang.StringgetRealm()java.util.List<java.lang.String>getRealms(Challenge.AuthorizationMethod method)inthashCode()booleanisAuthTokenSupported()A boolean value indicating whether the sender of the challenge can accept OAuth2 Token.booleanisHashCredentialSupported()A boolean value indicating whether the sender of the challenge can accept hash credentials.booleanisPortalUserTokenSupported()A boolean value indicating whether the sender of the challenge can accept Portal User Token.booleanisUsernamePasswordSupported()Is a username/password pair an acceptable response for this challenge?java.lang.StringtoString()
-
-
-
Constructor Detail
-
Challenge
public Challenge(java.lang.String realm, java.lang.String host, java.lang.String location, boolean usernamePasswordSupported, boolean hashCredentialSupported, boolean PortalUserTokenSupported, boolean authTokenSupported, int failureCount, int requestId, java.util.Map<Challenge.AuthorizationMethod,java.util.List<java.lang.String>> realmsMap)
-
-
Method Detail
-
getRealm
public java.lang.String getRealm()
- Returns:
- the Realm value associated with the challenge. If the challenge supports multiple auth methods, username/password authorization Realm is returned.
-
getRealms
public java.util.List<java.lang.String> getRealms(Challenge.AuthorizationMethod method)
- Parameters:
method- auth method associated with the challenge.- Returns:
- list of Realm values for the specified auth method associated with the challenge. If the challenge does not support specified method or the method does not have associated Realm value, empty list is returned.
-
getHost
public java.lang.String getHost()
- Returns:
- the Host for the credential request.
-
isHashCredentialSupported
public boolean isHashCredentialSupported()
A boolean value indicating whether the sender of the challenge can accept hash credentials.- Returns:
- The return value is true if the sender can accept hash credentials, otherwise false.
-
isPortalUserTokenSupported
public boolean isPortalUserTokenSupported()
A boolean value indicating whether the sender of the challenge can accept Portal User Token.- Returns:
- The return value is true if the sender can accept Portal User Token, otherwise false.
-
getFailureCount
public int getFailureCount()
- Returns:
- the failure count based on the number of requests.
-
isAuthTokenSupported
public boolean isAuthTokenSupported()
A boolean value indicating whether the sender of the challenge can accept OAuth2 Token.- Returns:
- The return value is true if the sender can accept auth tokens, otherwise false.
-
isUsernamePasswordSupported
public boolean isUsernamePasswordSupported()
Is a username/password pair an acceptable response for this challenge?- Returns:
- The return value is true if username/password are an acceptable response, otherwise false.
-
getLocation
public java.net.URI getLocation()
Get location of authorization resource associated with auth token challenge. Credential provider can navigate to this URI using browser window in order to authorize and retrieve auth token for the challenge.- Returns:
- location of authorization resource associated with auth token challenge.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-