com.dyuproject.openid.ext
Class AxSchemaExtension

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

public final class AxSchemaExtension
extends AbstractExtension

AxSchema Extension for http://www.axschema.org/types/ - see also http://openid.net/specs/openid-attribute-exchange-1_0-05.html

Author:
David Yu
Date created:
May 27, 2009

Nested Class Summary
static class AxSchemaExtension.AbstractExchange
          Base class for an axschema exchange which requires a namespace for each field.
static class AxSchemaExtension.SimpleExchange
          SimpleExchange - exchanges a key with a value from the user's openid provider.
 
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 MODE_REQUEST
          "fetch_request"
static String MODE_RESPONSE
          "fetch_response"
static String NAMESPACE
          "http://openid.net/srv/ax/1.0"
 
Fields inherited from class com.dyuproject.openid.ext.AbstractExtension
_alias, _namespace
 
Constructor Summary
AxSchemaExtension()
           
AxSchemaExtension(String alias)
           
 
Method Summary
protected  AxSchemaExtension addExchange(Extension.Exchange exchange)
           
 AxSchemaExtension addExchange(String alias)
          Adds an exchange (field) to be included in the extension parameters.
 AxSchemaExtension addExchange(String alias, String namespace)
          Adds an exchange (field) to be included in the extension parameters.
static Map<String,String> get(OpenIdUser user)
          Gets the axchema 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 axchema 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

NAMESPACE

public static final String NAMESPACE
"http://openid.net/srv/ax/1.0"

See Also:
Constant Field Values

MODE_REQUEST

public static final String MODE_REQUEST
"fetch_request"

See Also:
Constant Field Values

MODE_RESPONSE

public static final String MODE_RESPONSE
"fetch_response"

See Also:
Constant Field Values

ATTR_NAME

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

See Also:
Constant Field Values
Constructor Detail

AxSchemaExtension

public AxSchemaExtension()

AxSchemaExtension

public AxSchemaExtension(String alias)
Method Detail

get

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


remove

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


addExchange

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


addExchange

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


addExchange

protected AxSchemaExtension 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.