Package com.nimbusds.oauth2.sdk.util
Class ResourceUtils
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.util.ResourceUtils
-
public final class ResourceUtils extends Object
Resource server URI utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static List<URI>ensureLegalResourceURIs(List<URI> resourceURIs)Ensures the specified resource URIs are legal.static booleanisLegalResourceURI(URI resourceURI)Returnstrueif the specified resource URI is legal.static booleanisValidResourceURI(URI resourceURI)Deprecated.UseisLegalResourceURI(java.net.URI)instead.static List<URI>parseResourceURIs(List<String> stringList)Parses a list of resource URIs from the specified string list.
-
-
-
Method Detail
-
isValidResourceURI
@Deprecated public static boolean isValidResourceURI(URI resourceURI)
Deprecated.UseisLegalResourceURI(java.net.URI)instead.Returnstrueif the specified resource URI is valid.- Parameters:
resourceURI- The resource URI. Must not benull.- Returns:
trueif the resource URI is valid,falseif the URI is not absolute or has a fragment.
-
isLegalResourceURI
public static boolean isLegalResourceURI(URI resourceURI)
Returnstrueif the specified resource URI is legal.- Parameters:
resourceURI- The resource URI,nullif not specified.- Returns:
trueif the resource URI is legal ornull,falseif the URI is not absolute or has a fragment.
-
ensureLegalResourceURIs
public static List<URI> ensureLegalResourceURIs(List<URI> resourceURIs)
Ensures the specified resource URIs are legal.- Parameters:
resourceURIs- The resource URIs,nullif not specified.- Returns:
- The checked resource URIs,
nullif not specified. - Throws:
IllegalArgumentException- If the resource URIs are not legal according toisLegalResourceURI(java.net.URI).
-
parseResourceURIs
public static List<URI> parseResourceURIs(List<String> stringList) throws ParseException
Parses a list of resource URIs from the specified string list.- Parameters:
stringList- The string list,nullif not specified.- Returns:
- The resource URIs,
nullif not specified. - Throws:
ParseException- If parsing failed.
-
-