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

WIP: Implement a component able to take a base 64 JSON encoded payload #25

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

Akanoa
Copy link

@Akanoa Akanoa commented Sep 9, 2022

Why this PR

I'd like to take the content of blocks and authorizer from a URL component.

I'd like also to be able to handle every playground parameter, because I'll pilot it from an iframe URL.

I'd like to add an export button to get the hash of the playground.

How

This component takes several attributes:

  • fromHash : The base 64 JSON URL encoded of data
  • displayFacts : Display or not the "Authorizer World"
  • displayExternalKeys : Don't display the 3rd party private key
  • showBlocks: Display other blocks than authorizer
  • displayExport: Display the export button
  • displayExternalKeys : Allow to use 3rd party blocks
  • allowCustomExternalKeys : Allow to overwrite pre-defined 3rd party private key
  • allowsRegenerate : Allow regenerate the biscuit private key

And show an export event, handling the hash of the playground content.

The data looks like:

{
    "code": "check if user(12);\nallow if true;",
    "blocks": [
        {
            "code": "user(12);",
            "externalKey": null
        }
    ]
}

screenshots

3rd party block with over writable private key

image

3rd party block without over writable private key

image

Without export

image

Without 3rd party

image

Only authorizer

image

With Authorizer World

image

Non 3rd party block

image

Token display

image

Without regenerate

image

@Akanoa Akanoa marked this pull request as ready for review September 10, 2022 18:17
@Akanoa
Copy link
Author

Akanoa commented Sep 10, 2022

Blocks by biscuit-auth/biscuit-component-wasm#6

@Akanoa Akanoa changed the title Implement a component able to take a base 64 JSON encoded payload Draft:Implement a component able to take a base 64 JSON encoded payload Sep 11, 2022
@Akanoa Akanoa changed the title Draft:Implement a component able to take a base 64 JSON encoded payload Draft: Implement a component able to take a base 64 JSON encoded payload Sep 11, 2022
@Akanoa Akanoa changed the title Draft: Implement a component able to take a base 64 JSON encoded payload WIP: Implement a component able to take a base 64 JSON encoded payload Sep 11, 2022
@Akanoa Akanoa marked this pull request as draft September 11, 2022 21:20
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.

1 participant