com.dyuproject.openid.ext
Class AxSchemaExtension.AbstractExchange

java.lang.Object
  extended by com.dyuproject.openid.ext.AxSchemaExtension.AbstractExchange
All Implemented Interfaces:
Extension.Exchange
Direct Known Subclasses:
AxSchemaExtension.SimpleExchange
Enclosing class:
AxSchemaExtension

public abstract static class AxSchemaExtension.AbstractExchange
extends Object
implements Extension.Exchange

Base class for an axschema exchange which requires a namespace for each field.

 A field request parameter is denoted as:
 openid.foo.type.bar = some_namespace
 
 A field response parameter is denoted as: 
 openid.foo.bar.value = value
 
 Where: 
 foo = extension alias
 bar = exchange alias
 
 


Field Summary
protected  String _alias
           
 
Constructor Summary
AxSchemaExtension.AbstractExchange(String alias)
           
 
Method Summary
 String getAlias()
          Gets the alias of this exchange.
abstract  String getNamespace()
          Gets the name space mapped with the alias.
 void parseAndPut(OpenIdUser user, HttpServletRequest request, Map<String,String> attributes, String extensionAlias)
          Parses a single field parameter as a response from the user's openid provider and puts it in the attributes map.
 void put(OpenIdUser user, HttpServletRequest request, UrlEncodedParameterMap params, String extensionAlias)
          Puts a single field parameter on the params to be included in the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_alias

protected final String _alias
Constructor Detail

AxSchemaExtension.AbstractExchange

public AxSchemaExtension.AbstractExchange(String alias)
Method Detail

getAlias

public final String getAlias()
Description copied from interface: Extension.Exchange
Gets the alias of this exchange.

Specified by:
getAlias in interface Extension.Exchange

put

public void put(OpenIdUser user,
                HttpServletRequest request,
                UrlEncodedParameterMap params,
                String extensionAlias)
Description copied from interface: Extension.Exchange
Puts a single field parameter on the params to be included in the request.

Specified by:
put in interface Extension.Exchange

parseAndPut

public void parseAndPut(OpenIdUser user,
                        HttpServletRequest request,
                        Map<String,String> attributes,
                        String extensionAlias)
Description copied from interface: Extension.Exchange
Parses a single field parameter as a response from the user's openid provider and puts it in the attributes map.

Specified by:
parseAndPut in interface Extension.Exchange

getNamespace

public abstract String getNamespace()
Gets the name space mapped with the alias.



Copyright © 2008-2013. All Rights Reserved.