Package org.javacord.api.util.auth
Class Challenge
- java.lang.Object
-
- org.javacord.api.util.auth.Challenge
-
public final class Challenge extends Object
This class represents an RFC 7235 authentication challenge.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Map<String,String>getAuthParams()Gets the auth params, includingrealmif present, but asStrings.Optional<String>getRealm()Returns the protection space.StringgetScheme()Gets the authentication scheme in lowercase, likebasic.inthashCode()StringtoString()
-
-
-
Method Detail
-
getScheme
public String getScheme()
Gets the authentication scheme in lowercase, likebasic.- Returns:
- The authentication scheme.
-
getAuthParams
public Map<String,String> getAuthParams()
Gets the auth params, includingrealmif present, but asStrings. The keys are all lowercase, as the auth param names are to be treated case insensitively anyway. If a challenge uses thetoken68form instead of the auth params form, there is exactly one entry in the result where the key isnulland the the value is the token.- Returns:
- The auth params.
-
getRealm
public Optional<String> getRealm()
Returns the protection space.- Returns:
- The protection space.
-
-