Package org.keycloak.protocol.oidc.utils
Class PairwiseSubMapperUtils
- java.lang.Object
- 
- org.keycloak.protocol.oidc.utils.PairwiseSubMapperUtils
 
- 
 public class PairwiseSubMapperUtils extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description PairwiseSubMapperUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static List<ProtocolMapperRepresentation>getPairwiseSubMappers(ClientRepresentation client)static booleanmatchesRedirects(String clientRootUrl, Set<String> clientRedirectUris, Set<String> sectorRedirects)Checks if the the registered client redirect URIs matches the set of redirect URIs from the sector identifier URI.static Set<String>resolveValidRedirectUris(String clientRootUrl, Collection<String> clientRedirectUris)Returns a set of valid redirect URIs from the root url and redirect URIs registered on a client.static StringresolveValidSectorIdentifier(String sectorIdentifierUri)Tries to resolve a valid sector identifier from a sector identifier URI.static StringresolveValidSectorIdentifier(String clientRootUrl, Set<String> clientRedirectUris)Tries to resolve a valid sector identifier from the redirect URIs registered on a client.
 
- 
- 
- 
Method Detail- 
resolveValidRedirectUrispublic static Set<String> resolveValidRedirectUris(String clientRootUrl, Collection<String> clientRedirectUris) Returns a set of valid redirect URIs from the root url and redirect URIs registered on a client.- Parameters:
- clientRootUrl-
- clientRedirectUris-
- Returns:
 
 - 
resolveValidSectorIdentifierpublic static String resolveValidSectorIdentifier(String sectorIdentifierUri) Tries to resolve a valid sector identifier from a sector identifier URI.- Parameters:
- sectorIdentifierUri-
- Returns:
- a sector identifier iff. the sector identifier URI is a valid URI, contains a valid scheme and contains a valid host component.
 
 - 
resolveValidSectorIdentifierpublic static String resolveValidSectorIdentifier(String clientRootUrl, Set<String> clientRedirectUris) Tries to resolve a valid sector identifier from the redirect URIs registered on a client.- Parameters:
- clientRootUrl- Root url registered on the client.
- clientRedirectUris- Redirect URIs registered on the client.
- Returns:
- a sector identifier iff. all the registered redirect URIs are located at the same host, otherwise null.
 
 - 
matchesRedirectspublic static boolean matchesRedirects(String clientRootUrl, Set<String> clientRedirectUris, Set<String> sectorRedirects) Checks if the the registered client redirect URIs matches the set of redirect URIs from the sector identifier URI.- Parameters:
- clientRootUrl- root url registered on the client.
- clientRedirectUris- redirect URIs registered on the client.
- sectorRedirects- value of the sector identifier URI.
- Returns:
- trueiff. the all the redirect URIs can be described by the- sectorRedirects, i.e if the registered redirect URIs is a subset of the- sectorRedirects, otherwise- false.
 
 - 
getPairwiseSubMapperspublic static List<ProtocolMapperRepresentation> getPairwiseSubMappers(ClientRepresentation client) 
 
- 
 
-