概要 | パッケージ | クラス | 使用 | 階層ツリー | 非推奨 API | 索引 | ヘルプ
| Tsukuyomi OpenID 0.2.0
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド

## jp.sourceforge.tsukuyomi.openid.rp.impl
クラス RelayPartyImpl

    java.lang.Object
      jp.sourceforge.tsukuyomi.openid.rp.impl.RelayPartyImpl

すべての実装されたインタフェース:
  RelayParty

    public class RelayPartyImpl

extends Object
implements RelayParty

フィールドの概要
`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`

フィールドの詳細

### DEBUG

    public static final boolean DEBUG

コンストラクタの詳細

### RelayPartyImpl

    public RelayPartyImpl()
                   throws RelayPartyException

例外:
  `RelayPartyException`

メソッドの詳細

### discover

    public List<DiscoveryInformation> discover(String identifier)
                                        throws DiscoveryException,
                                               IdentifierException

  定義:
    インタフェース `RelayParty` 内の `discover`
  例外:
    `DiscoveryException`
    `IdentifierException`

### setDiscovery

    public void setDiscovery(Discovery discovery)

### associate

    public DiscoveryInformation associate(List<DiscoveryInformation> discoveries)

  定義:
    インタフェース `RelayParty` 内の `associate`

### authenticate

    public AuthRequest authenticate(DiscoveryInformation discovered,
                                    String returnToUrl)
                             throws MessageException,
                                    RelayPartyException

  Builds a authentication request message for the user specified in the discovery information provided as a parameter.

  定義:
    インタフェース `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.
    Null if the Consumer does not with to for the End User to be returned to it (something else useful will have been performed via an extension).
    Must not be null in OpenID 1.x compatibility mode.
  戻り値:
    Authentication request message to be sent to the OpenID Provider.
  例外:
    `MessageException`
    `RelayPartyException`

### authenticate

    public AuthRequest authenticate(DiscoveryInformation discovered,
                                    String returnToUrl,
                                    String realm)
                             throws MessageException,
                                    RelayPartyException

  Builds a authentication request message for the user specified in the discovery information provided as a parameter.

  パラメータ:
    `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.
    Null if the Consumer does not with to for the End User to be returned to it (something else useful will have been performed via an extension).
    Must not be null in OpenID 1.x compatibility mode.
    `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
  戻り値:
    Authentication request message to be sent to the OpenID Provider.
  例外:
    `MessageException`
    `RelayPartyException`

### insertConsumerNonce

    public String insertConsumerNonce(String returnTo)

  Inserts a consumer-side nonce as a custom parameter in the return_to parameter of the authentication request.

  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.
  戻り値:
    The return_to URL containing the nonce.

### setConsumerNonceGenerator

    public void setConsumerNonceGenerator(NonceGenerator consumerNonceGenerator)

### verify

    public VerificationResult verify(String receivingUrl,
                                     ParameterList response,
                                     DiscoveryInformation discovered)
                              throws MessageException,
                                     DiscoveryException,
                                     AssociationException,
                                     IdentifierException

  Performs verification on the Authentication Response (assertion) received from the OpenID Provider.

  Three verification steps are performed:

  - nonce: the same assertion will not be accepted more than once
  - signatures: verifies that the message was indeed sent by the OpenID Provider that was contacted earlier after discovery
  - discovered information: the information contained in the assertion matches the one obtained during the discovery (the OpenID Provider is authoritative for the claimed identifier; the received assertion is not meaningful otherwise

  定義:
    インタフェース `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.
  戻り値:
    A VerificationResult, containing a verified identifier; the verified identifier is null if the verification failed).
  例外:
    `IdentifierException`
    `MessageException`
    `DiscoveryException`
    `AssociationException`

### verifyReturnTo

    public 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.

  パラメータ:
    `receivingUrl` - The URL where the Consumer received the authentication response.
    `response` - The authentication response.
  戻り値:
    True if the two URLs match, false otherwise.

### extractQueryParams

    public Map<String,List<String>> extractQueryParams(URL url)
                                                throws UnsupportedEncodingException

  Returns a Map(key, List(values)) with the URL's query params, or null if the URL doesn't have a query string.

  例外:
    `UnsupportedEncodingException`

### verifyNonce

    public boolean verifyNonce(AuthSuccess authResp,
                               DiscoveryInformation discovered)

  Verifies the nonce in an authentication response.

  パラメータ:
    `authResp` - The authentication response containing the nonce to be verified.
    `discovered` - The discovery information associated with the authentication transaction.
  戻り値:
    True if the nonce is valid, false otherwise.

### extractConsumerNonce

    public String extractConsumerNonce(String returnTo)

  Extracts the consumer-side nonce from the return_to parameter in authentication response from a OpenID 1.1 Provider.

  パラメータ:
    `returnTo` - return_to URL from the authentication response
  戻り値:
    The nonce found in the return_to URL, or null if it wasn't found.

### setNonceVerifier

    public void setNonceVerifier(NonceVerifier nonceVerifier)

### setAssociations

    public void setAssociations(ConsumerAssociationStore associations)

### getHttpClientManager

    public HttpClientManager getHttpClientManager()

### setHttpClientManager

    public void setHttpClientManager(HttpClientManager httpClientManager)

概要 | パッケージ | クラス | 使用 | 階層ツリー | 非推奨 API | 索引 | ヘルプ
| Tsukuyomi OpenID 0.2.0
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド

Copyright © 2008 Project Tsukuyomi. All Rights Reserved.