public class AuthenticationResponse
extends java.lang.Object
AuthenticationManager.authenticate
method.Constructor and Description |
---|
AuthenticationResponse(boolean valid,
java.lang.String data)
Makes an
AuthenticationResponse . |
AuthenticationResponse(boolean valid,
java.lang.String data,
java.util.Collection<?> groups)
Makes an
AuthenticationResponse . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getData()
Get the client data.
|
java.util.Collection<?> |
getGroups()
Gets the groups to which the user belongs.
|
boolean |
isValid()
Tests whether authentication was valid.
|
java.lang.String |
toString() |
public AuthenticationResponse(boolean valid, java.lang.String data)
AuthenticationResponse
.valid
- indicates that authentication was successful (valid)data
- Reserved for future use. May be set but will be ignored.public AuthenticationResponse(boolean valid, java.lang.String data, java.util.Collection<?> groups)
AuthenticationResponse
.
The supplied Collection
of groups may be either:
Collection<String>
for a simple collection of group namesCollection<Principal>
for groups with namespacesvalid
- indicates that authentication was successful (valid)data
- Reserved for future use. May be set but will be ignored.groups
- a Collection
of groups to which the user belongspublic boolean isValid()
true
if authentication was validpublic java.lang.String getData()
null
public java.util.Collection<?> getGroups()
Collection
of groups is either:
Collection<String>
for a simple collection of group namesCollection<Principal>
for groups with namespacesCollection
of group names - may be null
public java.lang.String toString()
toString
in class java.lang.Object