Interface CredentialsParser<C>
-
- Type Parameters:
C- The rich type that represents the credentials.
public interface CredentialsParser<C>This interface is used to parse the credentials component of anAuthorizationHTTP header. It should be implemented for each authorization type that is wanted to be richly supported.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanParse(String type)Whether this parser parses the given authorization type.Cparse(String credentials)Parse the provided credentials into a rich representation.
-
-
-
Method Detail
-
canParse
boolean canParse(String type)
Whether this parser parses the given authorization type.- Parameters:
type- The type.- Returns:
- Whether the type is parsed by this parser.
- See Also:
AuthorizationHeader.getType()
-
parse
C parse(String credentials) throws MalformedHeaderException
Parse the provided credentials into a rich representation.- Parameters:
credentials- The credentials string.- Returns:
- The rich type for the credentials.
- Throws:
MalformedHeaderException- If the credentials are malformed.- See Also:
AuthorizationHeader.getCredentials()
-
-