Package org.ldaptive.auth
Class AuthenticationRequest
- java.lang.Object
-
- org.ldaptive.auth.AuthenticationRequest
-
public class AuthenticationRequest extends Object
Contains the data required to perform an ldap authentication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AuthenticationRequest.Builder
Authentication request builder.
-
Field Summary
Fields Modifier and Type Field Description private RequestControl[]
controls
Request controls.private Credential
credential
User credential.private String[]
returnAttributes
User attributes to return.private User
user
User.
-
Constructor Summary
Constructors Constructor Description AuthenticationRequest()
Default constructor.AuthenticationRequest(String id, Credential c)
Creates a new authentication request.AuthenticationRequest(String id, Credential c, String... attrs)
Creates a new authentication request.AuthenticationRequest(User u, Credential c)
Creates a new authentication request.AuthenticationRequest(User u, Credential c, String... attrs)
Creates a new authentication request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthenticationRequest.Builder
builder()
Creates a builder for this class.static AuthenticationRequest
copy(AuthenticationRequest request)
Returns an authentication request initialized with the supplied request.RequestControl[]
getControls()
Returns the controls.Credential
getCredential()
Returns the credential.String[]
getReturnAttributes()
Returns the return attributes.User
getUser()
Returns the user.void
setControls(RequestControl... cntrls)
Sets the controls.void
setCredential(Credential c)
Sets the credential.void
setReturnAttributes(String... attrs)
Sets the return attributes.void
setUser(User u)
Sets the user.String
toString()
-
-
-
Field Detail
-
user
private User user
User.
-
credential
private Credential credential
User credential.
-
returnAttributes
private String[] returnAttributes
User attributes to return.
-
controls
private RequestControl[] controls
Request controls.
-
-
Constructor Detail
-
AuthenticationRequest
public AuthenticationRequest()
Default constructor.
-
AuthenticationRequest
public AuthenticationRequest(String id, Credential c)
Creates a new authentication request.- Parameters:
id
- that identifies the userc
- credential to authenticate the user
-
AuthenticationRequest
public AuthenticationRequest(String id, Credential c, String... attrs)
Creates a new authentication request.- Parameters:
id
- that identifies the userc
- credential to authenticate the userattrs
- attributes to return
-
AuthenticationRequest
public AuthenticationRequest(User u, Credential c)
Creates a new authentication request.- Parameters:
u
- that identifies the userc
- credential to authenticate the user
-
AuthenticationRequest
public AuthenticationRequest(User u, Credential c, String... attrs)
Creates a new authentication request.- Parameters:
u
- that identifies the userc
- credential to authenticate the userattrs
- attributes to return
-
-
Method Detail
-
getUser
public User getUser()
Returns the user.- Returns:
- user identifier
-
setUser
public void setUser(User u)
Sets the user.- Parameters:
u
- user
-
getCredential
public Credential getCredential()
Returns the credential.- Returns:
- user credential
-
setCredential
public void setCredential(Credential c)
Sets the credential.- Parameters:
c
- user credential
-
getReturnAttributes
public String[] getReturnAttributes()
Returns the return attributes.- Returns:
- attributes to return
-
setReturnAttributes
public void setReturnAttributes(String... attrs)
Sets the return attributes.- Parameters:
attrs
- return attributes
-
getControls
public RequestControl[] getControls()
Returns the controls.- Returns:
- controls
-
setControls
public void setControls(RequestControl... cntrls)
Sets the controls.- Parameters:
cntrls
- controls to set
-
copy
public static AuthenticationRequest copy(AuthenticationRequest request)
Returns an authentication request initialized with the supplied request.- Parameters:
request
- authentication request to read properties from- Returns:
- authentication request
-
builder
public static AuthenticationRequest.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-