com.brightsparklabs.dropwizard.bundles.auth.external.IdentityPrincipalConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-external-auth-bundle Show documentation
Show all versions of dropwizard-external-auth-bundle Show documentation
Dropwizard bundle for trusting externally authenticated users
The newest version!
/*
* Maintained by brightSPARK Labs.
* www.brightsparklabs.com
*
* Refer to LICENSE at repository root for license details.
*/
package com.brightsparklabs.dropwizard.bundles.auth.external;
import java.util.Optional;
/**
* {@link PrincipalConverter} representing the identity function where the principal is an {@link
* InternalUser}
*/
public class IdentityPrincipalConverter implements PrincipalConverter {
@Override
public Optional convertToInternalUser(final InternalUser principal) {
return Optional.of(principal);
}
@Override
public InternalUser convertToPrincipal(final InternalUser internalUser) {
return internalUser;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy