com.github.casside.util.URLUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cas-x-support-clients Show documentation
Show all versions of cas-x-support-clients Show documentation
delegate authn plugins for cas server
The newest version!
package com.github.casside.util;
import com.nimbusds.oauth2.sdk.util.URLUtils;
import java.util.List;
import org.springframework.util.CollectionUtils;
public class URLUtil {
public static String getParam(String url, String name) {
String[] splits = url.split("\\?");
if (splits.length > 1) {
List p = URLUtils.parseParameters(splits[1]).get(name);
if (!CollectionUtils.isEmpty(p)) {
return p.get(0);
}
}
return null;
}
}