Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
e9f31fe4
Commit
e9f31fe4
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
add missing interface method
parent
bb3472e6
No related branches found
Branches containing commit
No related tags found
1 merge request
!31
Redeem from issuer
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/controller.py
+24
-0
24 additions, 0 deletions
src/_zkapauthorizer/controller.py
with
24 additions
and
0 deletions
src/_zkapauthorizer/controller.py
+
24
−
0
View file @
e9f31fe4
...
...
@@ -114,6 +114,25 @@ class IRedeemer(Interface):
final.
"""
def
tokens_to_passes
(
message
,
unblinded_tokens
):
"""
Construct passes from unblinded tokens which are suitable for use with a
given message.
:param bytes message: A valid utf-8-encoded byte sequence which serves
to protect the resulting passes from replay usage. It is
preferable if every use of passes is associated with a unique
message.
:param list[UnblindedToken] unblinded_tokens: Unblinded tokens,
previously returned by a call to this implementation
'
s ``redeem``
method.
:return list[Pass]: Passes constructed from the message and unblinded
tokens. There is one pass in the resulting list for each unblinded
token in ``unblinded_tokens``.
"""
@implementer
(
IRedeemer
)
class
NonRedeemer
(
object
):
...
...
@@ -132,6 +151,11 @@ class NonRedeemer(object):
# Don't try to redeem them.
return
Deferred
()
def
tokens_to_passes
(
self
,
message
,
unblinded_tokens
):
raise
Exception
(
"
Cannot be called because no unblinded tokens are ever returned.
"
)
@implementer
(
IRedeemer
)
@attr.s
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment