public class SubjectCreator extends Object
Subject formed by the Principal's returned from:
AuthenticationProvider
SubjectCreator is a facade to the AuthenticationProvider, and is intended to be
the single place that Subject's are created in the broker.
| Constructor and Description |
|---|
SubjectCreator(AuthenticationProvider<?> authenticationProvider,
Collection<GroupProvider<?>> groupProviders,
boolean secure) |
| Modifier and Type | Method and Description |
|---|---|
SubjectAuthenticationResult |
authenticate(SaslServer server,
byte[] response)
Authenticates a user using SASL negotiation.
|
SubjectAuthenticationResult |
authenticate(String username,
String password) |
SubjectAuthenticationResult |
createResultWithGroups(AuthenticationResult authenticationResult) |
SaslServer |
createSaslServer(String mechanism,
String localFQDN,
Principal externalPrincipal) |
Subject |
createSubjectWithGroups(Principal userPrincipal) |
AuthenticationProvider<?> |
getAuthenticationProvider() |
List<String> |
getMechanisms()
Gets the known SASL mechanisms
|
public SubjectCreator(AuthenticationProvider<?> authenticationProvider, Collection<GroupProvider<?>> groupProviders, boolean secure)
public AuthenticationProvider<?> getAuthenticationProvider()
public List<String> getMechanisms()
public SaslServer createSaslServer(String mechanism, String localFQDN, Principal externalPrincipal) throws SaslException
public SubjectAuthenticationResult authenticate(SaslServer server, byte[] response)
server - SASL serverresponse - SASL response to processpublic SubjectAuthenticationResult authenticate(String username, String password)
public SubjectAuthenticationResult createResultWithGroups(AuthenticationResult authenticationResult)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.