|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openid4java.server.ServerManager
public class ServerManager
Manages OpenID communications with an OpenID Relying Party (Consumer).
Constructor Summary | |
---|---|
ServerManager()
Constructs a ServerManager with default settings. |
|
ServerManager(RealmVerifierFactory factory)
|
Method Summary | |
---|---|
Message |
associationResponse(ParameterList requestParams)
Processes a Association Request and returns a Association Response message, according to the request parameters and the preferences configured for the OpenID Provider |
Message |
authResponse(AuthRequest authReq,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(AuthRequest authReq,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
boolean signNow)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(AuthRequest auhtReq,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
java.lang.String opEndpoint)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(AuthRequest authReq,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
java.lang.String opEndpoint,
boolean signNow)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(ParameterList requestParams,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(ParameterList requestParams,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
boolean signNow)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(ParameterList requestParams,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
java.lang.String opEndpoint)
Processes a Authentication Request received from a consumer site. |
Message |
authResponse(ParameterList requestParams,
java.lang.String userSelId,
java.lang.String userSelClaimed,
boolean authenticatedAndApproved,
java.lang.String opEndpoint,
boolean signNow)
Processes a Authentication Request received from a consumer site, after parsing the request parameters into a valid AuthRequest. |
boolean |
getEnforceRpId()
Gets the flag that instructs the realm verifier to enforce validation of the return URL agains the endpoints discovered from the RP's realm. |
int |
getExpireIn()
Gets the expiration time (in seconds) for the generated associations |
AssociationSessionType |
getMinAssocSessEnc()
Gets the minimum level of encryption configured for association sessions. |
NonceGenerator |
getNonceGenerator()
Gets the NonceGenerator used for generating nonce tokens to uniquely identify authentication responses. |
java.lang.String |
getOPEndpointUrl()
Gets OpenID Provider's endpoint URL, where it accepts OpenID authentication requests. |
AssociationSessionType |
getPrefAssocSessEnc()
Gets the preferred association / session type. |
ServerAssociationStore |
getPrivateAssociations()
Gets the store implementation used for keeping track of the generated private associations (used for signing responses to stateless consumer sites). |
RealmVerifier |
getRealmVerifier()
Gets the RealmVerifier used to verify realms against return_to URLs. |
ServerAssociationStore |
getSharedAssociations()
Gets the store implementation used for keeping track of the generated associations established with consumer sites. |
java.lang.String[] |
getSignExtensions()
|
java.lang.String |
getSignFields()
Gets the list of parameters that the OpenID Provider will sign when generating authentication responses. |
java.lang.String |
getUserSetupUrl()
Gets the URL at the OpenID Provider where the user should be directed when a immediate authentication request fails. |
void |
setEnforceRpId(boolean enforceRpId)
Sets the flag that instructs the realm verifier to enforce validation of the return URL agains the endpoints discovered from the RP's realm. |
void |
setExpireIn(int _expireIn)
Sets the expiration time (in seconds) for the generated associations |
void |
setMinAssocSessEnc(AssociationSessionType minAssocSessEnc)
Configures the minimum level of encryption accepted for association sessions. |
void |
setNonceGenerator(NonceGenerator nonceGenerator)
Sets the NonceGenerator implementation that will be used to generate nonce tokens to uniquely identify authentication responses. |
void |
setOPEndpointUrl(java.lang.String opEndpointUrl)
Sets the OpenID Provider's endpoint URL, where it accepts OpenID authentication requests. |
void |
setPrefAssocSessEnc(AssociationSessionType type)
Sets the preferred association / session type. |
void |
setPrivateAssociations(ServerAssociationStore privateAssociations)
Sets the store implementation that will be used for keeping track of the generated private associations (used for signing responses to stateless consumer sites). |
void |
setRealmVerifier(RealmVerifier realmVerifier)
Sets the RealmVerifier used to verify realms against return_to URLs. |
void |
setSharedAssociations(ServerAssociationStore sharedAssociations)
Sets the store implementation that will be used for keeping track of the generated associations established with consumer sites. |
void |
setSignExtensions(java.lang.String[] extensins)
|
void |
setSignFields(java.lang.String signFields)
Sets the list of parameters that the OpenID Provider will sign when generating authentication responses. |
void |
setUserSetupUrl(java.lang.String userSetupUrl)
Sets the URL at the OpenID Provider where the user should be directed when a immediate authentication request fails. |
void |
sign(AuthSuccess authSuccess)
Signs an AuthSuccess message, using the association identified by the handle specified within the message. |
Message |
verify(ParameterList requestParams)
Responds to a verification request from the consumer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerManager()
@Inject public ServerManager(RealmVerifierFactory factory)
Method Detail |
---|
public ServerAssociationStore getSharedAssociations()
ServerAssociationStore
public void setSharedAssociations(ServerAssociationStore sharedAssociations)
sharedAssociations
- ServerAssociationStore implementationServerAssociationStore
public ServerAssociationStore getPrivateAssociations()
ServerAssociationStore
public void setPrivateAssociations(ServerAssociationStore privateAssociations)
privateAssociations
- ServerAssociationStore implementationServerAssociationStore
public AssociationSessionType getMinAssocSessEnc()
Default: no-encryption session, SHA1 MAC association
public NonceGenerator getNonceGenerator()
NonceGenerator
public void setNonceGenerator(NonceGenerator nonceGenerator)
NonceGenerator
public void setMinAssocSessEnc(AssociationSessionType minAssocSessEnc)
Default: no-encryption session, SHA1 MAC association
public AssociationSessionType getPrefAssocSessEnc()
public void setPrefAssocSessEnc(AssociationSessionType type) throws ServerException
ServerException
AssociationSessionType
public int getExpireIn()
public void setExpireIn(int _expireIn)
public java.lang.String getUserSetupUrl()
public void setUserSetupUrl(java.lang.String userSetupUrl)
public void setSignFields(java.lang.String signFields)
The fields in the list must be coma-separated and must not include the 'openid.' prefix. Fields that are required to be signed are automatically added by the underlying logic, so that a valid message is generated, regardles if they are included in the user-supplied list or not.
public java.lang.String getSignFields()
Coma-separated list.
public void setSignExtensions(java.lang.String[] extensins)
public java.lang.String[] getSignExtensions()
public RealmVerifier getRealmVerifier()
public void setRealmVerifier(RealmVerifier realmVerifier)
public boolean getEnforceRpId()
public void setEnforceRpId(boolean enforceRpId)
public java.lang.String getOPEndpointUrl()
This is a global setting for the ServerManager; can also be set on a per message basis.
authResponse(org.openid4java.message.ParameterList, String, String, boolean, String)
public void setOPEndpointUrl(java.lang.String opEndpointUrl)
This is a global setting for the ServerManager; can also be set on a per message basis.
authResponse(org.openid4java.message.ParameterList, String, String, boolean, String)
public Message associationResponse(ParameterList requestParams)
public Message authResponse(ParameterList requestParams, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved)
Uses ServerManager's global OpenID Provider endpoint URL.
authResponse(org.openid4java.message.ParameterList, String, String,
boolean, String, boolean)
public Message authResponse(AuthRequest authReq, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved)
Uses ServerManager's global OpenID Provider endpoint URL.
authResponse(org.openid4java.message.AuthRequest, String, String,
boolean, String, boolean)
public Message authResponse(ParameterList requestParams, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, boolean signNow)
Uses ServerManager's global OpenID Provider endpoint URL.
authResponse(org.openid4java.message.ParameterList, String, String,
boolean, String, boolean)
public Message authResponse(AuthRequest authReq, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, boolean signNow)
Uses ServerManager's global OpenID Provider endpoint URL.
authResponse(org.openid4java.message.AuthRequest, String, String,
boolean, String, boolean)
public Message authResponse(ParameterList requestParams, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, java.lang.String opEndpoint)
authResponse(org.openid4java.message.ParameterList, String, String,
boolean, String, boolean)
public Message authResponse(AuthRequest auhtReq, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, java.lang.String opEndpoint)
authResponse(org.openid4java.message.AuthRequest, String, String,
boolean, String, boolean)
public Message authResponse(ParameterList requestParams, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, java.lang.String opEndpoint, boolean signNow)
authResponse(org.openid4java.message.AuthRequest, String, String,
boolean, String, boolean)
public Message authResponse(AuthRequest authReq, java.lang.String userSelId, java.lang.String userSelClaimed, boolean authenticatedAndApproved, java.lang.String opEndpoint, boolean signNow)
opEndpoint
- The endpoint URL where the OP accepts OpenID
authentication requests.authReq
- A valid authentication request.userSelId
- OP-specific Identifier selected by the user at
the OpenID Provider; if present it will override
the one received in the authentication request.userSelClaimed
- Claimed Identifier selected by the user at
the OpenID Provider; if present it will override
the one received in the authentication request.authenticatedAndApproved
- Flag indicating that the OP has
authenticated the user and the user
has approved the authentication
transactionsignNow
- If true, the returned AuthSuccess will be signed.
If false, the signature will not be computed and
set - this will have to be performed later,
using #sign(org.openid4java.message.Message).
public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException
authSuccess
- The Authentication Success message to be signed.
ServerException
- If the Association corresponding to the handle
in the @authSuccess cannot be retrieved from
the store.
AssociationException
- If the signature cannot be computed.public Message verify(ParameterList requestParams)
requestParams
- ParameterList containing the parameters received
in a verification request from a consumer site.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |