com.dyuproject.openid.ext
Class SRegExtension

java.lang.Object
  extended by com.dyuproject.openid.ext.AbstractExtension
      extended by com.dyuproject.openid.ext.SRegExtension
All Implemented Interfaces:
Extension, RelyingParty.Listener

public final class SRegExtension
extends AbstractExtension

Simple Registration Extension See http://openid.net/specs/openid-simple-registration-extension-1_1-01.html

Author:
David Yu
Date created:
May 27, 2009

Nested Class Summary
static class SRegExtension.SimpleExchange
          SimpleExchange - parses the value denoted by "openid.sreg.$alias = value".
 
Nested classes/interfaces inherited from interface com.dyuproject.openid.ext.Extension
Extension.Exchange
 
Field Summary
static String ATTR_NAME
          The attribute name set on the OpenIdUser.
static String NAMESPACE
          "http://openid.net/extensions/sreg/1.1"
static String NS_KEY
          "openid.ns.sreg"
static String OPTIONAL_KEY
          "openid.sreg.optional"
 
Fields inherited from class com.dyuproject.openid.ext.AbstractExtension
_alias, _namespace
 
Constructor Summary
SRegExtension()
           
 
Method Summary
protected  SRegExtension addExchange(Extension.Exchange exchange)
           
 SRegExtension addExchange(String alias)
          Adds an exchange (field) to be included in the extension parameters.
static Map<String,String> get(OpenIdUser user)
          Gets the sreg value set on the user.
 void onAuthenticate(OpenIdUser user, HttpServletRequest request)
          Callback that gets called when the user has been redirected back to the relying party's site and his authentication has been successfully verified.
 void onPreAuthenticate(OpenIdUser user, HttpServletRequest request, UrlEncodedParameterMap params)
          Callback that gets called before the user is redirected to this provider for authentication.
static Map<String,String> remove(OpenIdUser user)
          Removes the sreg value set on the user.
 
Methods inherited from class com.dyuproject.openid.ext.AbstractExtension
equals, getAlias, getNamespace, onAccess, onDiscovery
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NS_KEY

public static final String NS_KEY
"openid.ns.sreg"

See Also:
Constant Field Values

OPTIONAL_KEY

public static final String OPTIONAL_KEY
"openid.sreg.optional"

See Also:
Constant Field Values

NAMESPACE

public static final String NAMESPACE
"http://openid.net/extensions/sreg/1.1"

See Also:
Constant Field Values

ATTR_NAME

public static final String ATTR_NAME
The attribute name set on the OpenIdUser. ("sreg")

See Also:
Constant Field Values
Constructor Detail

SRegExtension

public SRegExtension()
Method Detail

get

public static Map<String,String> get(OpenIdUser user)
Gets the sreg value set on the user.


remove

public static Map<String,String> remove(OpenIdUser user)
Removes the sreg value set on the user.


addExchange

public SRegExtension addExchange(String alias)
Adds an exchange (field) to be included in the extension parameters.


addExchange

protected SRegExtension addExchange(Extension.Exchange exchange)

onPreAuthenticate

public void onPreAuthenticate(OpenIdUser user,
                              HttpServletRequest request,
                              UrlEncodedParameterMap params)
Description copied from interface: RelyingParty.Listener
Callback that gets called before the user is redirected to this provider for authentication.


onAuthenticate

public void onAuthenticate(OpenIdUser user,
                           HttpServletRequest request)
Description copied from interface: RelyingParty.Listener
Callback that gets called when the user has been redirected back to the relying party's site and his authentication has been successfully verified.



Copyright © 2008-2013. All Rights Reserved.