From f627e9c92eac71810ccb0988c3018ed0a0fa72fb Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Fri, 20 Jan 2012 15:35:54 -0600
Subject: Initial draft of CaptchaAuthentication
---
spec/Channel_Interface_Captcha_Authentication.xml | 303 ++++++++++++++++++++++
spec/all.xml | 1 +
2 files changed, 304 insertions(+)
create mode 100644 spec/Channel_Interface_Captcha_Authentication.xml
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
new file mode 100644
index 00000000..dd2c7f1a
--- /dev/null
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -0,0 +1,303 @@
+
+
+ Copyright © 2010 Collabora Limited
+
+ This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ (as stable API)
+
+
+ A channel interface for Captcha authentication.
+ When this interface appears on a ServerAuthentication
+ channel, it represents authentication with the server. In future,
+ it could also be used to authenticate with secondary services,
+ or even to authenticate end-to-end connections with contacts. As a result,
+ this interface does not REQUIRE ServerAuthentication to allow for a potential future
+ Channel.Type.PeerAuthentication interface.
+
+ In any protocol that requires a captcha, the connection manager can
+ use this channel to let a user interface carry out a simple Captcha
+ handshake with it, as a way to test the user is human
+ interactively.
+
+ For channels managed by a
+ ChannelDispatcher,
+ only the channel's Handler may call the
+ methods on this interface. Other clients MAY observe the
+ authentication process by watching its signals and properties.
+
+
+ There can only be one Handler, which is a good fit for Captcha's
+ 1-1 conversation between a client and a server.
+
+
+
+
+
+ A struct containing captcha data marked with its MIME type.
+
+ May be set to an empty byte-array and an empty string, indicating
+ no captcha.
+
+
+
+
+
+
+
+ The captcha data challenge to respond to.
+
+ When the channel's handler is ready to proceed, it should respond
+ to the challenge by calling Respond.
+ Alternatively, it may call AbortCaptcha
+ to abort authentication.
+
+
+
+
+
+ If true, RefreshCaptcha
+ can be expected to work when in the Local_Pending state. If
+ false, RefreshCaptcha isn't
+ supported and won't work.
+
+
+ Refreshing the captcha isn't required to work, although
+ some protocols and implementations allow it. This is usually
+ done in case a given captcha is too difficult to read.
+
+
+
+
+
+
+ The current status of this channel.
+ Change notification is via the
+ CaptchaStatusChanged signal.
+
+
+
+
+
+ The reason for the CaptchaStatus, or
+ an empty string if the state is neither
+ Incorrect_Captcha nor Failed.
+
+ In particular, an ordinary authentication failure (as would
+ be produced for an incorrect password) SHOULD be represented by
+ AuthenticationFailed,
+ cancellation by the user's request SHOULD be represented
+ by Cancelled, and
+ cancellation by a local process due to inconsistent or invalid
+ challenges from the server SHOULD be represented by
+ ServiceConfused.
+
+ If this interface appears on a ServerAuthentication
+ channel, and connection to the server fails with an authentication
+ failure, this error code SHOULD be copied into the
+ Connection.ConnectionError
+ signal.
+
+
+
+
+
+ If CaptchaError is non-empty,
+ any additional information about the last
+ disconnection; otherwise, the empty map. The keys and values are
+ the same as for the second argument of
+ Connection.ConnectionError.
+
+ If this interface appears on a ServerAuthentication
+ channel, and connection to the server fails with an authentication
+ failure, these details SHOULD be copied into the
+ Connection.ConnectionError
+ signal.
+
+
+
+
+
+
+ The response data as a string.
+
+
+
+ Send a response to the current captcha challenge contained within
+ the Captcha property.
+
+
+
+
+
+ Either the state is not Local_Pending, no challenge has been
+ received yet, or you have already responded to the last challenge.
+
+
+
+
+
+
+
+
+ Request a new captcha challenge.
+
+
+
+
+
+ Either the state is not Local_Pending, no challenge has been
+ received yet, or you have already responded to the last challenge.
+
+
+
+
+
+
+
+
+
+ Reason for abort.
+
+
+
+
+ Debug message for abort.
+
+
+
+ Abort the current authentication try.
+
+ If the current status is Captcha_Status_Captcha_Failed,
+ this method returns successfully, but has
+ no further effect. If the current status is
+ Captcha_Status_Local_Prending, then it changes the channel's
+ state to Captcha_Status_Client_Failed, with an appropriate
+ error name and reason code. Otherwise, NotAvailable is raised.
+
+
+
+
+ The current state is either Succeeded, Incorrect_Response,
+ or Remote_Pending.
+
+
+
+
+
+
+
+ Emitted when the status of the channel changes.
+
+
+
+ The new value of CaptchaStatus.
+
+
+
+
+ The new value of CaptchaError.
+
+
+
+
+ The new value of CaptchaErrorDetails.
+
+
+
+
+
+
+ A reason why Captcha authentication was aborted by the client.
+
+
+
+
+ The server sent an invalid challenge or data.
+
+
+
+
+ The user aborted the authentication.
+
+
+
+
+
+
+
+ The challenge/response exchange is in progress and waiting for
+ a local action. The Handler SHOULD call either
+ Respond or
+ AbortCaptcha at any time.
+
+
+
+
+ The challenge/response exchange is in progress and waiting for
+ a response from the server. The
+ Captcha property MAY not be
+ valid in this state.
+
+
+
+
+ Everyone is happy. Connection to the server will proceed as soon as
+ this state is reached. The Handler SHOULD call Close
+ to close the channel.
+
+
+
+
+ The server has indicated an authentication failure.
+ If the server allows another attempt, the
+ Captcha will be updated
+ and the state will be changed to Local_Pending, after which
+ the handler may once again call
+ Respond.
+ Otherwise, the state will shortly be changed to Captcha_Failed
+
+
+
+
+ The server has indicated no more authentication attempts
+ are allowed. This state means no more attempts may be made and
+ the handler should give up completely, by calling Close
+ on the channel.
+
+
+
+
+
+
+
diff --git a/spec/all.xml b/spec/all.xml
index 72e4c491..de979ca1 100644
--- a/spec/all.xml
+++ b/spec/all.xml
@@ -168,6 +168,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
--
cgit v1.2.3
From 41651d8c9a524eb503d9f69a27187fd5c2bb676b Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Fri, 27 Jan 2012 19:13:59 -0600
Subject: Revise CaptchaAuthentication spec based on comments and redesign
This patch revises the CaptchaAuthentication spec based on
comments and a more flexible redesign. Most of this design and
wording comes from Simon McVittie's sketch in fd.o #32125.
---
spec/Channel_Interface_Captcha_Authentication.xml | 259 +++++++++++++++-------
1 file changed, 178 insertions(+), 81 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index dd2c7f1a..7727320b 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(as stable API)
- A channel interface for Captcha authentication.
+
A channel interface for captcha authentication.
When this interface appears on a ServerAuthentication
channel, it represents authentication with the server. In future,
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Channel.Type.PeerAuthentication interface.
In any protocol that requires a captcha, the connection manager can
- use this channel to let a user interface carry out a simple Captcha
+ use this channel to let a user interface carry out a simple captcha
handshake with it, as a way to test the user is human
interactively.
@@ -44,46 +44,72 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
authentication process by watching its signals and properties.
- There can only be one Handler, which is a good fit for Captcha's
+
There can only be one Handler, which is a good fit for captcha's
1-1 conversation between a client and a server.
-
+
- A struct containing captcha data marked with its MIME type.
-
- May be set to an empty byte-array and an empty string, indicating
- no captcha.
+ A struct containing information regarding a single captcha
+ mechanism.
-
-
+
+
+ The ID with which to reference this captcha method.
+ They are unique within this channel instance only.
+
+
+
+
+ Type as defined in XEP-0158.
+
+
+
+
+ Label is as defined in XEP-0158. In particular for "qa"
+ it's the question.
+
+
+
+
+ One flag defined: Required. Most captchas will have no flags.
+
+
-
+
- The captcha data challenge to respond to.
-
- When the channel's handler is ready to proceed, it should respond
- to the challenge by calling Respond.
- Alternatively, it may call AbortCaptcha
- to abort authentication.
+ A mapping of captcha IDs to answer strings.
-
+
+
+ The ID of the captcha to which the associated
+ answer string is answering.
+
+
+
+
+ The answer string to answer the captcha referenced
+ by the associated ID.
+
+
+
-
- If true, RefreshCaptcha
- can be expected to work when in the Local_Pending state. If
- false, RefreshCaptcha isn't
- supported and won't work.
+ If true, GetCaptchas
+ can be expected to return new captcha information when
+ in the Local_Pending state. If false,
+ GetCaptchas will return
+ NotAvailable on subsequent calls.
Refreshing the captcha isn't required to work, although
some protocols and implementations allow it. This is usually
- done in case a given captcha is too difficult to read.
+ done in case a given captcha is unintelligible.
@@ -101,11 +127,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
name="CaptchaError" tp:name-for-bindings="Captcha_Error">
The reason for the CaptchaStatus, or
- an empty string if the state is neither
- Incorrect_Captcha nor Failed.
+ an empty string if the state is neither Try_Again nor Failed.
+
+ Typical values: "", Cancelled, AuthenticationFailed, NotAvailable
In particular, an ordinary authentication failure (as would
- be produced for an incorrect password) SHOULD be represented by
+ be produced for an incorrect answer) SHOULD be represented by
AuthenticationFailed,
cancellation by the user's request SHOULD be represented
by Cancelled, and
@@ -144,76 +171,130 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-
- The response data as a string.
+
+
+
+ Information about each of the available captcha methods.
+
+
+
+
+ The number of captcha methods required to be answered
+ in order to successfully complete this captcha challenge.
+
+
+
+
+ The language of each label in Captcha_Info if available,
+ or "" if unknown.
- Send a response to the current captcha challenge contained within
- the Captcha property.
+ Gets information regarding each of the captcha methods
+ available and which and how many need to be successfully answered
- Either the state is not Local_Pending, no challenge has been
- received yet, or you have already responded to the last challenge.
+ Either the state is not Local_Pending or it has already
+ been called and CanRefreshCaptcha
+ is False.
-
+
+
+
+ The ID of the captcha of which to retrieve data.
+
+
+
+
+ MIME types supported by the handler in order of priority.
+
+
+
+
+ MIME type selected by the CM of the returned data.
+
+
+
+
+ Captcha data as requested.
+
+
+
+ Fetch and return the captcha data, giving highest priority
+ to MIME types earlier in the list if possible. The CM is
+ expected to implement HTTP, for instance, if captchas in this
+ protocol generally require it.
+ Returns an empty array if the type was "qa"
+
+ If audio-based and image-based captchas are both available,
+ we don't want to waste time downloading the audio until/unless
+ the user asks to hear it. The extra D-Bus round-trips are not
+ a problem, since they are expected to be quick compared with
+ the time taken for the user to solve the captcha.
+
+
+
+
+
+
+
+ The mapping of captcha IDs to answer strings.
+
+
- Request a new captcha challenge.
+ Answer as many captchas as desired and/or required.
+ Callable in state Local_Pending only. State changes to
+ Remote_Pending.
- Either the state is not Local_Pending, no challenge has been
- received yet, or you have already responded to the last challenge.
+ The state is not in Local_Pending.
-
-
+
+
- Reason for abort.
+ Reason for cancelling.
- Debug message for abort.
+ Debug message to describe reason for cancelling.
- Abort the current authentication try.
-
- If the current status is Captcha_Status_Captcha_Failed,
- this method returns successfully, but has
- no further effect. If the current status is
- Captcha_Status_Local_Prending, then it changes the channel's
- state to Captcha_Status_Client_Failed, with an appropriate
- error name and reason code. Otherwise, NotAvailable is raised.
+ Cancel. State changes to Failed with error NotAvailable or
+ Cancelled if it isn't already Failed. All you can do now is
+ to close the channel.
- The current state is either Succeeded, Incorrect_Response,
- or Remote_Pending.
+ The current state is Failed.
-
+
Emitted when the status of the channel changes.
@@ -234,66 +315,82 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
+
- A reason why Captcha authentication was aborted by the client.
+ Extra flags to include with Captcha information
-
+
- The server sent an invalid challenge or data.
+ This captcha mechanism is required to be successfully
+ answered in order to pass this captcha challenge.
-
-
+
+
+
+
+
+ A reason why captcha authentication was aborted by the client.
+
+
+
The user aborted the authentication.
+
+
+ The handler doesn't support the given/required captcha types.
+
+
The challenge/response exchange is in progress and waiting for
- a local action. The Handler SHOULD call either
- Respond or
- AbortCaptcha at any time.
+ a local action. Call AnswerCaptchas
+ to go to the Remote_Pending state, or call
+ CancelCaptcha followed by
+ Close
+ to give up.
The challenge/response exchange is in progress and waiting for
- a response from the server. The
- Captcha property MAY not be
- valid in this state.
+ a response from the server. Wait for a reply from the server,
+ which will result in the Succeeded, Try_Again, or Failed state,
+ or call CancelCaptcha followed by
+ Close
+ to give up.
Everyone is happy. Connection to the server will proceed as soon as
- this state is reached. The Handler SHOULD call Close
to close the channel.
-
+
The server has indicated an authentication failure.
- If the server allows another attempt, the
- Captcha will be updated
- and the state will be changed to Local_Pending, after which
- the handler may once again call
- Respond.
- Otherwise, the state will shortly be changed to Captcha_Failed
+ Call GetCaptchas again to get
+ a new captcha (if possible), or
+ CancelCaptcha followed by
+ Close
+ to give up.
-
+
- The server has indicated no more authentication attempts
- are allowed. This state means no more attempts may be made and
- the handler should give up completely, by calling Close
- on the channel.
+ Authentication has failed in some way. There is nothing
+ useful to do in this state except to close the channel with
+ Close
+ to close the channel.
--
cgit v1.2.3
From b9eddb9b85304e00c6d4ddce99d7db7d56319af3 Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Tue, 31 Jan 2012 23:25:30 -0600
Subject: Revise CaptchaAuthentication spec based on comments in fd.o #32125
This patch revises CaptchaAuthentication to include comments from
Simon McVittie from fd.o bug #32125. A lot of the wording is from
him again.
---
spec/Channel_Interface_Captcha_Authentication.xml | 178 +++++++++++++++-------
spec/errors.xml | 10 ++
spec/generic-types.xml | 8 +
3 files changed, 138 insertions(+), 58 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index 7727320b..c703e7df 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -17,9 +17,11 @@ Lesser General Public License for more details.
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- (as stable API)
+
+ (version 1)
+
A channel interface for captcha authentication.
When this interface appears on a
+ The most commonly used form of captcha challenge is OCR (recognition
+ of distorted letters or words in an image), but for accessibility
+ reasons, this interface also allows various other types of challenge,
+ such as plain-text questions or recognition of words in audio. Its
+ structure is modelled on XMPP's
+ XEP-0158,
+ but can be used with other protocols by mapping their semantics
+ into those used in XMPP.
+
- There can only be one Handler, which is a good fit for captcha's
- 1-1 conversation between a client and a server.
+ It is important to support multiple types of captcha
+ challenge to avoid discriminating against certain users; for
+ instance, blind or partially-sighted users cannot be expected
+ to answer an OCR challenge.
+
+ XEP-0158 supports a superset of all other known protocols' captcha
+ interfaces, and is sufficiently elaborate that we expect it will
+ continue to do so.
+
+ There can only be one Handler, which is a good fit for the
+ question/answer model implied by captchas.
@@ -56,19 +76,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- The ID with which to reference this captcha method.
+
The ID with which to reference this captcha method
+ when retrieving its data and answering it.
They are unique within this channel instance only.
- Type as defined in XEP-0158.
+ The type of challenge
+
+ as defined by XEP-0158. For instance, the commonly-used
+ "type the letters/words you see in this image" challenge is
+ represented by ocr
- Label is as defined in XEP-0158. In particular for "qa"
- it's the question.
+ A human-readable label for the challenge, as defined in XEP-0158.
+ In particular, when Type = qa
, this is a plain-text
+ question for the user to answer.
@@ -96,8 +122,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
If true, GetCaptchas
@@ -117,9 +143,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- The current status of this channel.
- Change notification is via the
- CaptchaStatusChanged signal.
+ The current status of this channel.
+
+ Because only the Handler should call methods on this interface,
+ the Handler MAY reduce round-trips by not fetching the initial
+ value of this property, and instead assume that is initially
+ Local_Pending.
+
+
+ This assumption normally avoids the need to call GetAll(),
+ since the values of CaptchaError
+ and CaptchaErrorDetails
+ are also implied by this assumption, and the only other
+ property is CanRetryCaptcha,
+ which is immutable.
+
@@ -129,13 +167,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The reason for the CaptchaStatus, or
an empty string if the state is neither Try_Again nor Failed.
- Typical values: "", Cancelled, AuthenticationFailed, NotAvailable
+ Typical values: "", Cancelled, AuthenticationFailed,
+ CaptchaNotSupported
In particular, an ordinary authentication failure (as would
be produced for an incorrect answer) SHOULD be represented by
AuthenticationFailed,
cancellation by the user's request SHOULD be represented
- by Cancelled, and
+ by Cancelled, cancellation due
+ to the inability to display the captcha to the user or otherwise
+ answer it SHOULD be represented by
+ CaptchaNotSupported, and
cancellation by a local process due to inconsistent or invalid
challenges from the server SHOULD be represented by
ServiceConfused.
@@ -181,26 +223,46 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The number of captcha methods required to be answered
- in order to successfully complete this captcha challenge.
+ in order to successfully complete this captcha challenge
+ (most frequently 1, but XMPP allows servers to demand that
+ more than one captcha is answered).
-
+
- The language of each label in Captcha_Info if available,
- or "" if unknown.
+ The language of each Label in Captcha_Info if available,
+ for instance en_US, or "" if unknown.
Gets information regarding each of the captcha methods
available and which and how many need to be successfully answered
+
+ To call this method successfully, the state must be Local_Pending
+ or Try_Again. If it is Local_Pending, it remains Local_Pending. If
+ called more than once while in Local_Pending state, or if the state
+ is Try_Again, this method fetches a new set of captcha challenges,
+ if possible, and the state returns to Local_Pending.
+
+
+ For instance, you could call GetCaptchas again from Local_Pending
+ state if the user indicates that they can't understand the
+ initially-offered captcha.
+
+ This is a method, not a property, so that it can be used to
+ fetch more than one set of captcha challenges, and so that
+ change notification is not required. Only the Handler should
+ call this method and calling GetAll would not reduce round-trips,
+ so the usual reasons to prefer a property do not apply here.
+
- Either the state is not Local_Pending or it has already
- been called and CanRefreshCaptcha
- is False.
+ Either the state is not Local_Pending or Try_Again, or it has
+ already been called and
+ CanRetryCaptcha is False.
@@ -216,6 +278,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
MIME types supported by the handler in order of priority.
+
+ XEP-0158 allows the same captcha to be make available in
+ multiple formats, for instance the same spoken question as
+ audio/x-wav, application/ogg and audio/speex.
+
@@ -230,9 +297,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Fetch and return the captcha data, giving highest priority
- to MIME types earlier in the list if possible. The CM is
- expected to implement HTTP, for instance, if captchas in this
- protocol generally require it.
+ to MIME types earlier in the list if possible. In protocols
+ where captchas are downloaded out-of-band (for instance via HTTP),
+ the connection manager is expected to do so.
Returns an empty array if the type was "qa"
If audio-based and image-based captchas are both available,
@@ -271,12 +338,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Reason for cancelling.
+ Reason for cancelling. This MAY be used to choose an error
+ response to the remote server, and SHOULD also be reflected
+ in the CaptchaError.
- Debug message to describe reason for cancelling.
+ A textual description of the reason for cancelling, supplied
+ by the Handler. This message SHOULD NOT be sent to the remote
+ server, but SHOULD be copied into the 'debug-message' field
+ of the CaptchaErrorDetails and
+ ConnectionError.
@@ -293,28 +366,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
- Emitted when the status of the channel changes.
-
-
-
- The new value of CaptchaStatus.
-
-
-
-
- The new value of CaptchaError.
-
-
-
-
- The new value of CaptchaErrorDetails.
-
-
-
-
Extra flags to include with Captcha information
@@ -335,12 +386,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- The user aborted the authentication.
+ The user aborted the authentication. If this is used, the
+ CaptchaError SHOULD be set to
+ Cancelled
- The handler doesn't support the given/required captcha types.
+ The Handler doesn't support the given/required captcha types.
+ If this is used, the CaptchaError
+ SHOULD be set to CaptchaNotSupported.
+
+
+
+
+ The Handler doesn't understand the captcha data received. The
+ challenger may be sending gibberish.
+ If this is used, the CaptchaError
+ SHOULD be set to ServiceConfused.
@@ -352,7 +415,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
a local action. Call AnswerCaptchas
to go to the Remote_Pending state, or call
CancelCaptcha followed by
- Close
+ Close
to give up.
@@ -362,7 +425,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
a response from the server. Wait for a reply from the server,
which will result in the Succeeded, Try_Again, or Failed state,
or call CancelCaptcha followed by
- Close
+ Close
to give up.
@@ -371,7 +434,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Everyone is happy. Connection to the server will proceed as soon as
this state is reached. There is nothing useful to do in this state
except to call Close
+ namespace="ofdT.Channel">Close
to close the channel.
@@ -379,9 +442,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The server has indicated an authentication failure.
Call GetCaptchas again to get
- a new captcha (if possible), or
+ a new captcha, or
CancelCaptcha followed by
- Close
+ Close
to give up.
@@ -389,8 +452,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Authentication has failed in some way. There is nothing
useful to do in this state except to close the channel with
- Close
- to close the channel.
+ Close.
diff --git a/spec/errors.xml b/spec/errors.xml
index 7726f3cf..b0cd9c2d 100644
--- a/spec/errors.xml
+++ b/spec/errors.xml
@@ -637,6 +637,16 @@
+
+
+
+ Raised if the CaptchaAuthentication1
+ Handler either has no UI to present captchas, or it does, but wasn't
+ able to answer any of the captchas given.
+
+
+
Copyright © 2005-2010 Collabora Limited
Copyright © 2005-2009 Nokia Corporation
diff --git a/spec/generic-types.xml b/spec/generic-types.xml
index 014f8ada..2676e453 100644
--- a/spec/generic-types.xml
+++ b/spec/generic-types.xml
@@ -212,4 +212,12 @@
+
+
+ A language tag as defined in
+ IETF BCP 47,
+ such as "en_US".
+
+
+
--
cgit v1.2.3
From 95a502a36dd6fb7082b78be993eae400bf0903ac Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Wed, 1 Feb 2012 15:17:35 -0600
Subject: A few more revisions based on comments in fd.o bug #32125
---
spec/Channel_Interface_Captcha_Authentication.xml | 11 ++++++++++-
spec/errors.xml | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index c703e7df..eb53b4b6 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -18,7 +18,7 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- (version 1)
+ (version 1)
@@ -396,6 +396,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The Handler doesn't support the given/required captcha types.
If this is used, the CaptchaError
SHOULD be set to CaptchaNotSupported.
+ This SHOULD also be used if
+ Close is called
+ before Cancel.
+
+ If no Handler supports captcha channels,
+ the ChannelDispatcher will just call
+ Close,
+ because it has no knowledge of specific channel types.
+
diff --git a/spec/errors.xml b/spec/errors.xml
index b0cd9c2d..c9e85dd3 100644
--- a/spec/errors.xml
+++ b/spec/errors.xml
@@ -638,7 +638,7 @@
-
+
Raised if the CaptchaAuthentication1
--
cgit v1.2.3
From ef3ef348ebe19c88d8e74719a84904cdea8a8249 Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Thu, 9 Feb 2012 20:36:03 -0600
Subject: Correct typo
---
spec/Channel_Interface_Captcha_Authentication.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index eb53b4b6..e5c19915 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -279,7 +279,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
MIME types supported by the handler in order of priority.
- XEP-0158 allows the same captcha to be make available in
+ XEP-0158 allows the same captcha to be made available in
multiple formats, for instance the same spoken question as
audio/x-wav, application/ogg and audio/speex.
--
cgit v1.2.3
From 2b44a32e025b02ea21cf1287af6b195bac8686ae Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Thu, 9 Feb 2012 20:40:02 -0600
Subject: Fix incorrect member-ref
---
spec/Channel_Interface_Captcha_Authentication.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index e5c19915..517b5b76 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -398,7 +398,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
SHOULD be set to CaptchaNotSupported.
This SHOULD also be used if
Close is called
- before Cancel.
+ before CancelCaptcha.
If no Handler supports captcha channels,
the ChannelDispatcher will just call
--
cgit v1.2.3
From b8a2c847a87c8d3d3d2dd4894e8d8bf55d696336 Mon Sep 17 00:00:00 2001
From: Mike Ruprecht
Date: Thu, 9 Feb 2012 20:42:01 -0600
Subject: Have CM provide available MIME types and let CM choose the one to use
---
spec/Channel_Interface_Captcha_Authentication.xml | 30 +++++++++++++++--------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index 517b5b76..bf4fcfff 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -102,6 +102,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
One flag defined: Required. Most captchas will have no flags.
+
+
+ A list of MIME types the server is offering to provide
+ for this captcha method.
+
+
@@ -215,7 +221,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ type="a(ussuas)" tp:type="Captcha_Info[]">
Information about each of the available captcha methods.
@@ -275,9 +281,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The ID of the captcha of which to retrieve data.
-
+
- MIME types supported by the handler in order of priority.
+ MIME type picked by the Handler, chosen from the list of MIME
+ types received in GetCaptchas.
XEP-0158 allows the same captcha to be made available in
multiple formats, for instance the same spoken question as
@@ -285,19 +292,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
- MIME type selected by the CM of the returned data.
-
-
Captcha data as requested.
- Fetch and return the captcha data, giving highest priority
- to MIME types earlier in the list if possible. In protocols
+
Fetch and return the captcha data. In protocols
where captchas are downloaded out-of-band (for instance via HTTP),
the connection manager is expected to do so.
Returns an empty array if the type was "qa"
@@ -309,6 +310,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
the time taken for the user to solve the captcha.
+
+
+
+ The state is not in Local_Pending or
+ GetCaptchas had never been called.
+
+
+
+
--
cgit v1.2.3
From bbdbcc277e2656338477ce91650878415f6f4ebe Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Mon, 13 Feb 2012 15:25:08 +0000
Subject: Update copyright date
---
spec/Channel_Interface_Captcha_Authentication.xml | 2 +-
spec/all.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index bf4fcfff..5cbfc236 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -1,7 +1,7 @@
- Copyright © 2010 Collabora Limited
+ Copyright © 2010-2012 Collabora Limited
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/spec/all.xml b/spec/all.xml
index de979ca1..186fbfc1 100644
--- a/spec/all.xml
+++ b/spec/all.xml
@@ -5,7 +5,7 @@
Telepathy D-Bus Interface Specification
0.25.1.1
-Copyright © 2005-2011 Collabora Limited
+Copyright © 2005-2012 Collabora Limited
Copyright © 2005-2011 Nokia Corporation
Copyright © 2006 INdT
--
cgit v1.2.3
From aa64fd15879e30d307aeb360b014ef1338bb11da Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Tue, 14 Feb 2012 10:52:49 +0000
Subject: Captcha: allow labels to be the empty string, for "UI should supply"
---
spec/Channel_Interface_Captcha_Authentication.xml | 30 ++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication.xml
index 5cbfc236..22f3440f 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication.xml
@@ -92,9 +92,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- A human-readable label for the challenge, as defined in XEP-0158.
- In particular, when Type = qa
, this is a plain-text
- question for the user to answer.
+ A human-readable label for the challenge, as defined in
+ XEP-0158.
+
+ If the server does not supply a label for a challenge of type
+ other than qa
, connection managers SHOULD set Label
+ to an empty string instead of generating their own text.
+ If the Label is an empty string, the Handler SHOULD replace
+ it with a generic label in the user's locale, such as
+ the strings suggested in XEP-0158 (for instance,
+ Enter the text you see
for ocr
+ challenges). The Handler MAY use those generic labels
+ in any case, as per
+ the
+ Internationalization Considerations section of XEP-0158.
+
+
+ Connection managers are not usually localized, so text
+ generated by the connection manager would be in English,
+ regardless of the user's locale. The Handler is better-placed
+ to generate a generic Label in the user's locale.
+
+
+ For challenges of type qa
, the Label is a plain-text
+ question for the user to answer. The connection manager
+ SHOULD NOT provide an empty Label; if it does, the Handler
+ SHOULD treat that challenge as impossible, and SHOULD NOT
+ attempt to display it.
--
cgit v1.2.3