Skip to content
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

feat: add code to interact with authority service #6

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

mfontanini
Copy link
Member

@mfontanini mfontanini commented Mar 10, 2025

This adds an AuthorityService class that allows getting tokens from the authority service.

Example use

    key = PrivateKey()
    service = AuthorityService("http://localhost:30921")

    service_key = service.about().public_key
    envelope = service.request_token(key)
    envelope.validate_signatures()

    assert envelope.token.token.issuer.public_key == service_key

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13774605068

Details

  • 23 of 27 (85.19%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 93.939%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/nuc/authority.py 23 27 85.19%
Totals Coverage Status
Change from base Build 13772601848: -0.5%
Covered Lines: 465
Relevant Lines: 495

💛 - Coveralls

@mfontanini mfontanini marked this pull request as ready for review March 10, 2025 21:01
Base automatically changed from feat/builder to main March 11, 2025 13:52
@mfontanini mfontanini merged commit cfd2e5a into main Mar 11, 2025
4 checks passed
@mfontanini mfontanini deleted the feat/authority-service branch March 11, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants