New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #1197 - Principal instance not injected when annotated #1241

Merged
merged 1 commit into from Sep 2, 2015

Conversation

Projects
None yet
2 participants
@StanSvec
Contributor

StanSvec commented Aug 30, 2015

Principal parameter which is not annotated with Auth annotation shouldn't be authenticated. This worked before but only when such parameter is not annotated with any annotation. Otherwise parameter injection failed. The prove that this didn't work is NoAuthPrincipalEntityTest.annotatedPrincipalEntityWithoutAuth test which fails without the fix.

Btw., still wondering why Auth annotation is allowed on method and type level..

import javax.ws.rs.container.ContainerRequestFilter;
import java.security.Principal;
public abstract class AbstractAuthResourceConfig extends DropwizardResourceConfig {

This comment has been minimized.

@carlo-rtr

carlo-rtr Aug 31, 2015

Member

Good Idea

@carlo-rtr

This comment has been minimized.

Member

carlo-rtr commented Aug 31, 2015

Thanks for this. The failures look like they were due to our flaky tests.

This PR looks good to me. I'll give it a day to see what others think.

carlo-rtr added a commit that referenced this pull request Sep 2, 2015

Merge pull request #1241 from StanSvec/#1197_Principal_not_injected_w…
…hen_annotated

Fix for #1197 - Principal instance not injected when annotated

@carlo-rtr carlo-rtr merged commit d2bbabf into dropwizard:master Sep 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment