Skip to content

Enhance/Refactor ServiceMethodInvoker.mapPrincipal() #909

@artem-v

Description

@artem-v
  • Even if method is not secured - still apply principalMapper.map(context) (if mapper is present)

  • Simplify

    return Mono.defer(() -> principalMapper.map(context))
        .switchIfEmpty(Mono.just(context.principal()));

to

return Mono.defer(() -> principalMapper.map(context))

Let client worry about what to return in the mapper. Don't make scalecube to "fallback" something if it was null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions