Package com.nimbusds.oauth2.sdk.util
Class ResourceUtils
java.lang.Object
com.nimbusds.oauth2.sdk.util.ResourceUtils
Resource server URI utilities.
-
Method Summary
Modifier and TypeMethodDescriptionensureLegalResourceURIs
(List<URI> resourceURIs) Ensures the specified resource URIs are legal.static boolean
isLegalResourceURI
(URI resourceURI) Returnstrue
if the specified resource URI is legal.static boolean
isValidResourceURI
(URI resourceURI) Deprecated.parseResourceURIs
(List<String> stringList) Parses a list of resource URIs from the specified string list.
-
Method Details
-
isValidResourceURI
Deprecated.UseisLegalResourceURI(java.net.URI)
instead.Returnstrue
if the specified resource URI is valid.- Parameters:
resourceURI
- The resource URI. Must not benull
.- Returns:
true
if the resource URI is valid,false
if the URI is not absolute or has a fragment.
-
isLegalResourceURI
Returnstrue
if the specified resource URI is legal.- Parameters:
resourceURI
- The resource URI,null
if not specified.- Returns:
true
if the resource URI is legal ornull
,false
if the URI is not absolute or has a fragment.
-
ensureLegalResourceURIs
Ensures the specified resource URIs are legal.- Parameters:
resourceURIs
- The resource URIs,null
if not specified.- Returns:
- The checked resource URIs,
null
if not specified. - Throws:
IllegalArgumentException
- If the resource URIs are not legal according toisLegalResourceURI(java.net.URI)
.
-
parseResourceURIs
Parses a list of resource URIs from the specified string list.- Parameters:
stringList
- The string list,null
if not specified.- Returns:
- The resource URIs,
null
if not specified. - Throws:
ParseException
- If parsing failed.
-
isLegalResourceURI(java.net.URI)
instead.