|
Tsukuyomi OpenID 0.2.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.sourceforge.tsukuyomi.openid.rp.impl.RelayPartyImpl
public class RelayPartyImpl
フィールドの概要 | |
---|---|
static boolean |
DEBUG
|
コンストラクタの概要 | |
---|---|
RelayPartyImpl()
|
メソッドの概要 | |
---|---|
DiscoveryInformation |
associate(List<DiscoveryInformation> discoveries)
|
AuthRequest |
authenticate(DiscoveryInformation discovered,
String returnToUrl)
Builds a authentication request message for the user specified in the discovery information provided as a parameter. |
AuthRequest |
authenticate(DiscoveryInformation discovered,
String returnToUrl,
String realm)
Builds a authentication request message for the user specified in the discovery information provided as a parameter. |
List<DiscoveryInformation> |
discover(String identifier)
|
String |
extractConsumerNonce(String returnTo)
Extracts the consumer-side nonce from the return_to parameter in authentication response from a OpenID 1.1 Provider. |
Map<String,List<String>> |
extractQueryParams(URL url)
Returns a Map(key, List(values)) with the URL's query params, or null if the URL doesn't have a query string. |
HttpClientManager |
getHttpClientManager()
|
String |
insertConsumerNonce(String returnTo)
Inserts a consumer-side nonce as a custom parameter in the return_to parameter of the authentication request. |
void |
setAssociations(ConsumerAssociationStore associations)
|
void |
setConsumerNonceGenerator(NonceGenerator consumerNonceGenerator)
|
void |
setDiscovery(Discovery discovery)
|
void |
setHttpClientManager(HttpClientManager httpClientManager)
|
void |
setNonceVerifier(NonceVerifier nonceVerifier)
|
VerificationResult |
verify(String receivingUrl,
ParameterList response,
DiscoveryInformation discovered)
Performs verification on the Authentication Response (assertion) received from the OpenID Provider. |
boolean |
verifyNonce(AuthSuccess authResp,
DiscoveryInformation discovered)
Verifies the nonce in an authentication response. |
boolean |
verifyReturnTo(String receivingUrl,
AuthSuccess response)
Verifies that the URL where the Consumer (Relying Party) received the authentication response matches the value of the "openid.return_to" parameter in the authentication response. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public static final boolean DEBUG
コンストラクタの詳細 |
---|
public RelayPartyImpl() throws RelayPartyException
RelayPartyException
メソッドの詳細 |
---|
public List<DiscoveryInformation> discover(String identifier) throws DiscoveryException, IdentifierException
RelayParty
内の discover
DiscoveryException
IdentifierException
public void setDiscovery(Discovery discovery)
public DiscoveryInformation associate(List<DiscoveryInformation> discoveries)
RelayParty
内の associate
public AuthRequest authenticate(DiscoveryInformation discovered, String returnToUrl) throws MessageException, RelayPartyException
RelayParty
内の authenticate
discovered
- A DiscoveryInformation endpoint from the list obtained by
performing dicovery on the User-supplied OpenID identifier.returnToUrl
- The URL on the Consumer site where the OpenID Provider will
return the user after generating the authentication response.
MessageException
RelayPartyException
public AuthRequest authenticate(DiscoveryInformation discovered, String returnToUrl, String realm) throws MessageException, RelayPartyException
discovered
- A DiscoveryInformation endpoint from the list obtained by
performing dicovery on the User-supplied OpenID identifier.returnToUrl
- The URL on the Consumer site where the OpenID Provider will
return the user after generating the authentication response.
realm
- The URL pattern that will be presented to the user when he/she
will be asked to authorize the authentication transaction.
Must be a super-set of the
MessageException
RelayPartyException
public String insertConsumerNonce(String returnTo)
Needed for preventing replay attack when running compatibility mode. OpenID 1.1 OpenID Providers do not generate nonces in authentication responses.
returnTo
- The return_to URL to which a custom nonce parameter will be
added.
public void setConsumerNonceGenerator(NonceGenerator consumerNonceGenerator)
public VerificationResult verify(String receivingUrl, ParameterList response, DiscoveryInformation discovered) throws MessageException, DiscoveryException, AssociationException, IdentifierException
Three verification steps are performed:
RelayParty
内の verify
receivingUrl
- The URL where the Consumer (Relying Party) has accepted the
incoming message.response
- ParameterList of the authentication response being verified.discovered
- Previously discovered information (which can therefore be
trusted) obtained during the discovery phase; this should be
stored and retrieved by the RP in the user's session.
IdentifierException
MessageException
DiscoveryException
AssociationException
public boolean verifyReturnTo(String receivingUrl, AuthSuccess response)
receivingUrl
- The URL where the Consumer received the authentication
response.response
- The authentication response.
public Map<String,List<String>> extractQueryParams(URL url) throws UnsupportedEncodingException
UnsupportedEncodingException
public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered)
authResp
- The authentication response containing the nonce to be
verified.discovered
- The discovery information associated with the authentication
transaction.
public String extractConsumerNonce(String returnTo)
returnTo
- return_to URL from the authentication response
public void setNonceVerifier(NonceVerifier nonceVerifier)
public void setAssociations(ConsumerAssociationStore associations)
public HttpClientManager getHttpClientManager()
public void setHttpClientManager(HttpClientManager httpClientManager)
|
Tsukuyomi OpenID 0.2.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |