Skip to content

Add Kotlin example for SecuritySocketAcceptorInterceptor of RSocket #10932

@talerngpong

Description

@talerngpong

Describe the bug
An example of Adding SecuritySocketAcceptorInterceptor bullet comes with only Java example under RSocket Security.

To Reproduce

  1. Browse to Adding SecuritySocketAcceptorInterceptor bullet.
  2. Visually compare the bullet with the previous one Minimal RSocket Security Configuration.
  3. A coding block of Adding SecuritySocketAcceptorInterceptor comes with one Java example while a coding block of Minimal RSocket Security Configuration comes with both of Java and Kotlin examples.

Expected behavior
A coding block of Adding SecuritySocketAcceptorInterceptor should come with both of Java and Kotlin examples.

Sample

// current example
@Bean
RSocketServerCustomizer springSecurityRSocketSecurity(SecuritySocketAcceptorInterceptor interceptor) {
    return (server) -> server.interceptors((registry) -> registry.forSocketAcceptor(interceptor));
}
// purposed example to be added
@Bean
fun springSecurityRSocketSecurity(interceptor: SecuritySocketAcceptorInterceptor): RSocketServerCustomizer {
    return RSocketServerCustomizer { server ->
        server.interceptors { registry ->
            registry.forSocketAcceptor(interceptor)
        }
    }
}

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions