← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~maxiberta/launchpad/named-auth-tokens into lp:launchpad

 


Diff comments:

> === modified file 'lib/lp/soyuz/interfaces/archive.py'
> --- lib/lp/soyuz/interfaces/archive.py	2016-01-26 15:47:37 +0000
> +++ lib/lp/soyuz/interfaces/archive.py	2016-07-07 14:30:49 +0000
> @@ -2074,6 +2087,57 @@
>          :param dependency: is an `IArchive` object.
>          """
>  
> +    @operation_parameters(
> +        name=TextLine(title=_("Authorization token name"), required=True))

Can we instead drop the optional params `token` and `date_created`? They are not used anywhere.

> +    @export_write_operation()
> +    @operation_for_version("devel")
> +    def newNamedAuthToken(name, token=None, date_created=None):
> +        """Create a new named authorization token.
> +
> +        :param name: An identifier string for this token.
> +        :param token: Optional unicode text to use as the token. One will be
> +            generated if not given.
> +        :param date_created: Optional, defaults to now.
> +
> +        :return: A dictionary where the value of `token` is the secret and
> +            the value of `archive_url` is the externally-usable archive URL
> +            including basic auth.
> +        """
> +
> +    @operation_parameters(
> +        name=TextLine(title=_("Authorization token name"), required=True))
> +    @export_read_operation()
> +    @operation_for_version("devel")
> +    def getNamedAuthToken(name):
> +        """Return a named authorization token for a given archive and name.
> +
> +        :param name: The identifier string for a token.
> +
> +        :return: A dictionary where the value of `token` is the secret and
> +            the value of `archive_url` is the externally-usable archive URL
> +            including basic auth.
> +        """
> +
> +    @export_read_operation()
> +    @operation_for_version("devel")
> +    def getNamedAuthTokens():
> +        """Return a list of named authorization tokens for a given archive.
> +
> +        :return: A list of dictionaries where the value of `token` is the
> +            secret and the value of `archive_url` is the externally-usable
> +            archive URL including basic auth.
> +        """
> +
> +    @operation_parameters(
> +        name=TextLine(title=_("Authorization token name"), required=True))
> +    @export_write_operation()
> +    @operation_for_version("devel")
> +    def revokeNamedAuthToken(name):
> +        """Deactivates a named authorization token.
> +
> +        :param name: The identifier string for a token.
> +        """
> +
>  
>  class IArchiveAdmin(Interface):
>      """Archive interface for operations restricted by commercial."""


-- 
https://code.launchpad.net/~maxiberta/launchpad/named-auth-tokens/+merge/299432
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References