com.dyuproject.openid
Class RelyingParty
java.lang.Object
com.dyuproject.openid.RelyingParty
public class RelyingParty
- extends Object
Relying party which discovers, associates and verifies the authentication of a user.
An implementation of RelyingParty.Listener will enable you to listen to events
during a user's authentication lifecycle.
- Author:
- David Yu
Method Summary |
RelyingParty |
addListener(RelyingParty.Listener listener)
|
RelyingParty |
addResolver(Identifier.Resolver resolver)
|
boolean |
associateAndAuthenticate(OpenIdUser user,
HttpServletRequest request,
HttpServletResponse response,
String trustRoot,
String realm,
String returnTo)
|
void |
destroy()
|
OpenIdUser |
discover(HttpServletRequest request)
|
static Map<String,String> |
getAuthParameters(HttpServletRequest request)
|
static StringBuilder |
getAuthUrlBuffer(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
|
static UrlEncodedParameterMap |
getAuthUrlMap(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
|
static String |
getAuthUrlString(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
|
static RelyingParty |
getInstance()
|
OpenIdContext |
getOpenIdContext()
|
OpenIdUserManager |
getOpenIdUserManager()
|
boolean |
invalidate(HttpServletRequest request,
HttpServletResponse response)
|
static boolean |
isAuthResponse(HttpServletRequest request)
|
boolean |
isDestroyed()
|
static RelyingParty |
newInstance(InputStream in)
|
static RelyingParty |
newInstance(Properties properties)
|
static RelyingParty |
newInstance(String resourceLoc)
|
static RelyingParty |
newInstance(URL resource)
|
void |
setOpenIdContext(OpenIdContext context)
|
void |
setOpenIdUserManager(OpenIdUserManager manager)
|
boolean |
verifyAuth(OpenIdUser user,
HttpServletRequest request,
HttpServletResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_RESOURCE_PATH
public static final String DEFAULT_RESOURCE_PATH
- See Also:
- Constant Field Values
DEFAULT_IDENTIFIER_PARAMETER
public static final String DEFAULT_IDENTIFIER_PARAMETER
- See Also:
- Constant Field Values
RelyingParty
public RelyingParty()
RelyingParty
public RelyingParty(OpenIdContext context,
OpenIdUserManager manager)
getInstance
public static RelyingParty getInstance()
newInstance
public static RelyingParty newInstance(String resourceLoc)
newInstance
public static RelyingParty newInstance(URL resource)
throws IOException
- Throws:
IOException
newInstance
public static RelyingParty newInstance(InputStream in)
throws IOException
- Throws:
IOException
newInstance
public static RelyingParty newInstance(Properties properties)
getAuthParameters
public static Map<String,String> getAuthParameters(HttpServletRequest request)
isAuthResponse
public static boolean isAuthResponse(HttpServletRequest request)
getAuthUrlMap
public static UrlEncodedParameterMap getAuthUrlMap(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
getAuthUrlBuffer
public static StringBuilder getAuthUrlBuffer(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
getAuthUrlString
public static String getAuthUrlString(OpenIdUser user,
String trustRoot,
String realm,
String returnTo)
setOpenIdUserManager
public void setOpenIdUserManager(OpenIdUserManager manager)
getOpenIdUserManager
public OpenIdUserManager getOpenIdUserManager()
setOpenIdContext
public void setOpenIdContext(OpenIdContext context)
getOpenIdContext
public OpenIdContext getOpenIdContext()
isDestroyed
public boolean isDestroyed()
discover
public OpenIdUser discover(HttpServletRequest request)
throws Exception
- Throws:
Exception
verifyAuth
public boolean verifyAuth(OpenIdUser user,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
- Throws:
Exception
associateAndAuthenticate
public boolean associateAndAuthenticate(OpenIdUser user,
HttpServletRequest request,
HttpServletResponse response,
String trustRoot,
String realm,
String returnTo)
throws Exception
- Throws:
Exception
invalidate
public boolean invalidate(HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Throws:
IOException
addListener
public RelyingParty addListener(RelyingParty.Listener listener)
addResolver
public RelyingParty addResolver(Identifier.Resolver resolver)
destroy
public void destroy()
Copyright © 2013. All Rights Reserved.