0.4.18 • Published 4 years ago

@x/socket.serverless v0.4.18

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

@x/socket.serverless

@x/socket middleware to enable @x/serverless over a socket.

Authorisation

The @x/serverless feature provides authorisation features to the host. Please see the security guide for information on using this feature.

Aspects

The @x/serverless feature provides the following aspects:

Property Aspects

userId

Sets the property to the current user identifier.

Type Aspects

authenticated

Requires that the user is authenticated before publishing the message.

userConstraint(expression, failureMessage)

Requires the provided expression evaluates to a truthy value before allowing the message to be published. The expression is passed the current user model.

scopeOwnerOnly(...scopeProperties)

Requires that the current user owns the scope with the specified properties, or that the scope is not owned.

Call Aspects

authenticated

Requires that the user is authenticated before subscribing to the vocabulary.

userConstraint(expression, failureMessage)

Requires the provided expression evaluates to a truthy value before allowing the user to subscribe. The expression is passed the current user model.

userScope

Forces the vocabulary to be scoped by the current userId, along with any other required scope properties.

ownerOnly

Requires the user to be the owner of the scope specified with a scoped aspect.

scopeOwnerOnly(...scopeProperties)

Requires the user to be the owner of the scope specified by the provided property names.

0.4.18

4 years ago

0.4.17

4 years ago