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

Websocket frame validator #1825

Merged
merged 6 commits into from
Feb 7, 2024
Merged

Websocket frame validator #1825

merged 6 commits into from
Feb 7, 2024

Conversation

Zwiterrion
Copy link
Member

No description provided.

@Zwiterrion Zwiterrion marked this pull request as draft February 2, 2024 14:06

sealed trait WebsocketMessage[A] {
def data: A
def str()(implicit m: Materializer, ec: ExecutionContext): Future[String]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a bytes() method ?

def onRequestFlow: Boolean = false
def onResponseFlow: Boolean = false

def canAccess[A](ctx: NgWebsocketPluginContext, message: WebsocketMessage[A])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move this one in the validator plugin


trait NgWebsocketValidatorPlugin extends NgWebsocketPlugin {
def rejectStrategy(ctx: NgWebsocketPluginContext): RejectStrategy
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a transformer plugin

@Zwiterrion Zwiterrion merged commit 9ba1cc3 into master Feb 7, 2024
0 of 2 checks passed
@Zwiterrion Zwiterrion deleted the websocket-frame-validator branch November 7, 2024 07:56
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.

2 participants