danhaywood commented on a change in pull request #590:
URL: https://github.com/apache/isis/pull/590#discussion_r648485320
##########
File path:
core/security/src/main/java/org/apache/isis/core/security/authentication/Authentication.java
##########
@@ -91,8 +101,24 @@ default Type getType() {
// -- WITHERS
/**
- * Returns a copy with given {@code executionContext}.
- * @param executionContext
+ * Returns a copy with given {@code interactionContext}.
+ * @param interactionContext
*/
- Authentication withExecutionContext(ExecutionContext executionContext);
+ Authentication withInteractionContext(InteractionContext
interactionContext);
+
+ /**
+ * Looks up an {@link Authentication} from the provided {@link
InteractionContext}.
+ *
+ * <p>
+ * If the {@link InteractionContext} was created as the result of an
authentication process (as opposed to
+ * programmatically) then there will be an attached {@link
Authentication} object.
+ * </p>
+ *
+ * @param interactionContext
+ * @return
+ */
+ public static Optional<Authentication> authenticationFrom(final @NonNull
InteractionContext interactionContext) {
Review comment:
per comment above, perhaps use InteractionLayer ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]