Polish
This commit is contained in:
parent
a454c1c121
commit
22a426fe39
|
@ -74,14 +74,13 @@ class ReactiveTokenValidator {
|
|||
return Mono.just(this.cachedTokenKeys)
|
||||
.filter((tokenKeys) -> tokenKeys.containsKey(keyId))
|
||||
.switchIfEmpty(this.securityService.fetchTokenKeys()
|
||||
.doOnSuccess(fetchedTokenKeys -> {
|
||||
.doOnSuccess((fetchedTokenKeys) -> {
|
||||
this.cachedTokenKeys.clear();
|
||||
this.cachedTokenKeys.putAll(fetchedTokenKeys);
|
||||
})
|
||||
.filter((tokenKeys) -> tokenKeys.containsKey(keyId))
|
||||
.switchIfEmpty((Mono.error(
|
||||
new CloudFoundryAuthorizationException(Reason.INVALID_KEY_ID,
|
||||
"Key Id present in token header does not match")))))
|
||||
}).filter((tokenKeys) -> tokenKeys.containsKey(keyId))
|
||||
.switchIfEmpty((Mono.error(new CloudFoundryAuthorizationException(
|
||||
Reason.INVALID_KEY_ID,
|
||||
"Key Id present in token header does not match")))))
|
||||
.filter((tokenKeys) -> hasValidSignature(token, tokenKeys.get(keyId)))
|
||||
.switchIfEmpty(Mono.error(new CloudFoundryAuthorizationException(
|
||||
Reason.INVALID_SIGNATURE, "RSA Signature did not match content")))
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.data.cassandra;
|
|||
import com.datastax.driver.core.Cluster;
|
||||
import com.datastax.driver.core.Session;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
@ -52,7 +51,7 @@ public class CassandraReactiveDataAutoConfiguration {
|
|||
@Bean
|
||||
@ConditionalOnMissingBean(ReactiveSession.class)
|
||||
public ReactiveSession reactiveCassandraSession(Session session) {
|
||||
return new DefaultBridgedReactiveSession(session, Schedulers.elastic());
|
||||
return new DefaultBridgedReactiveSession(session);
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
Loading…
Reference in New Issue