Package org.pac4j.core.http.callback
Class QueryParameterCallbackUrlResolver
- java.lang.Object
-
- org.pac4j.core.http.callback.QueryParameterCallbackUrlResolver
-
- All Implemented Interfaces:
CallbackUrlResolver
public class QueryParameterCallbackUrlResolver extends java.lang.Object implements CallbackUrlResolver
The client name is added as a query parameter to the callback URL.- Since:
- 3.0.0
- Author:
- Jerome Leleu
-
-
Constructor Summary
Constructors Constructor Description QueryParameterCallbackUrlResolver()
QueryParameterCallbackUrlResolver(java.util.Map<java.lang.String,java.lang.String> customParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
compute(UrlResolver urlResolver, java.lang.String url, java.lang.String clientName, WebContext context)
Compute a callback URL from the provided URL resolver, URL, client name and web context.java.lang.String
getClientNameParameter()
boolean
matches(java.lang.String clientName, WebContext context)
Whether the current context matches the client name.void
setClientNameParameter(java.lang.String clientNameParameter)
-
-
-
Method Detail
-
compute
public java.lang.String compute(UrlResolver urlResolver, java.lang.String url, java.lang.String clientName, WebContext context)
Description copied from interface:CallbackUrlResolver
Compute a callback URL from the provided URL resolver, URL, client name and web context.- Specified by:
compute
in interfaceCallbackUrlResolver
- Parameters:
urlResolver
- the provided URL resolverurl
- the URLclientName
- the client namecontext
- the web context- Returns:
- the computed URL
-
matches
public boolean matches(java.lang.String clientName, WebContext context)
Description copied from interface:CallbackUrlResolver
Whether the current context matches the client name.- Specified by:
matches
in interfaceCallbackUrlResolver
- Parameters:
clientName
- the client namecontext
- the web context- Returns:
- whether the current context matches the client name
-
getClientNameParameter
public java.lang.String getClientNameParameter()
-
setClientNameParameter
public void setClientNameParameter(java.lang.String clientNameParameter)
-
-