Skip to content

Commit

Permalink
Improve javadoc for the spring security context manager.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjoerd Talsma <[email protected]>
  • Loading branch information
sjoerdtalsma committed Nov 24, 2024
1 parent 6fbc219 commit cd68deb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
import java.util.concurrent.atomic.AtomicBoolean;

/**
* A context manager that propagates spring-security {@link Authentication} objects
* into background threads using the {@code ContextAwareExecutorService}.
* Manager to propagate the {@linkplain Authentication Spring Security Authentication}
* from one thread to another.
*
* <p>
* Management of the authentication is fully delegated to the Spring {@link SecurityContextHolder},
* so no additional {@link java.lang.ThreadLocal} variables are used.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2016-2024 Talsma ICT
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Manager to propagate the {@linkplain org.springframework.security.core.Authentication Spring Security Authentication}
* from one thread to another.
*
* <p>
* This context manager maintains no ThreadLocal state of its own,
* instead it propagates the
* existing {@linkplain org.springframework.security.core.Authentication Authentication}
* from the {@linkplain org.springframework.security.core.context.SecurityContextHolder SecurityContextHolder}
* into each {@linkplain nl.talsmasoftware.context.api.ContextSnapshot context snapshot}
* to be applied again when the snapshot
* is {@linkplain nl.talsmasoftware.context.api.ContextSnapshot#reactivate() reactivated}
* in another thread.
*/
package nl.talsmasoftware.context.managers.spring.security;

0 comments on commit cd68deb

Please sign in to comment.