io.dropwizard.bundles.apikey.DefaultPrincipalFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-api-key-bundle Show documentation
Show all versions of dropwizard-api-key-bundle Show documentation
Dropwizard bundle that allows your application to support API keys.
package io.dropwizard.bundles.apikey;
import io.dropwizard.auth.PrincipalImpl;
import java.security.Principal;
/**
* A PrincipalFactory that provides a simple implementation of a Principal provided
* by the Dropwizard Auth module.
*/
public class DefaultPrincipalFactory implements PrincipalFactory {
@Override
public Principal create(String name) {
return new PrincipalImpl(name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy