-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blind authentication #675
Blind authentication #675
Conversation
# - Add the client ID "cashu-client" | ||
# - Enable the ES256 and RS256 algorithms for this client | ||
# - If you want to use the authorization flow, you must add the redirect URI "http://localhost:33388/callback". | ||
# - To support other wallets, use the well-known list of allowed redirect URIs here: https://...TODO.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... use the well-known list of allowed redirect URIs here https://...TODO.md
Looks like an unaddressed TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we will have the link only when we merge the corresponding NUT: cashubtc/nuts#198
) -> List[MeltQuote]: | ||
rows = await (conn or db).fetchall( | ||
f""" | ||
SELECT * from {db.table_with_schema('melt_quotes')} WHERE quote in (SELECT DISTINCT melt_quote FROM {db.table_with_schema('proofs_pending')}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SELECT * from {db.table_with_schema('melt_quotes')} WHERE quote in (SELECT DISTINCT melt_quote FROM {db.table_with_schema('proofs_pending')}) | |
SELECT * from {db.table_with_schema('melt_quotes')} | |
WHERE quote in ( | |
SELECT DISTINCT melt_quote FROM {db.table_with_schema('proofs_pending')} | |
) |
NIT: formatting to make it easier to read
secret TEXT NOT NULL, | ||
y TEXT NOT NULL, | ||
witness TEXT, | ||
created TIMESTAMP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created
should be NOT NULL
?
cashu/mint/auth/router.py
Outdated
) | ||
async def keys(): | ||
"""This endpoint returns a dictionary of all supported token values of the mint and their associated public key.""" | ||
logger.trace("> GET /v1/keys") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.trace("> GET /v1/keys") | |
logger.trace("> GET /v1/auth/blind/keys") |
cashu/mint/auth/router.py
Outdated
# BEGIN BACKWARDS COMPATIBILITY < 0.15.0 | ||
# if keyset_id is not hex, we assume it is base64 and sanitize it | ||
try: | ||
int(keyset_id, 16) | ||
except ValueError: | ||
keyset_id = keyset_id.replace("-", "+").replace("_", "/") | ||
# END BACKWARDS COMPATIBILITY < 0.15.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO can be removed, as there is no previous nutshell or API version that supported auth, with which we want to keep backward compatibility.
ACK. Added a few NITs and comments (see above), but otherwise LGTM. Also ran a few tests with the provided Keycloak test data, looked good. |
Implements clear and blind authentication NUT cashubtc/nuts#198 with keycloak (docker-compose provided)