/* * SPDX-FileCopyrightText: Copyright © 2024 WebGoat authors * SPDX-License-Identifier: GPL-2.0-or-later */ package org.owasp.webgoat.container; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.security.core.annotation.AuthenticationPrincipal; @Target({ElementType.PARAMETER, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @AuthenticationPrincipal(expression = "#this.getUsername()") public @interface CurrentUsername {}