WebSessionServerSecurityContextRepository Polish

- map(WebSession::getAttributes)
- use Mono.justOrEmpty

Issue: gh-4843
This commit is contained in:
Rob Winch
2017-11-16 13:23:38 -06:00
parent 8d30d6110b
commit be397b8b33
2 changed files with 13 additions and 4 deletions

View File

@@ -80,4 +80,10 @@ public class WebSessionServerSecurityContextRepositoryTests {
WebSession session = this.exchange.getSession().block();
assertThat(session.getId()).isNotEqualTo(originalSessionId);
}
@Test
public void loadWhenNullThenNull() {
SecurityContext context = this.repository.load(this.exchange).block();
assertThat(context).isNull();
}
}