# Class LoginConfig

java.lang.Object
org.apache.tomcat.util.descriptor.web.XmlEncodingBase
org.apache.tomcat.util.descriptor.web.LoginConfig

All Implemented Interfaces:
  `Serializable`

public class LoginConfig extends XmlEncodingBase implements Serializable
Representation of a login configuration element for a web application, as represented in a `<login-config>` element in the deployment descriptor.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`LoginConfig()`
Construct a new LoginConfig with default properties.
`LoginConfig(String authMethod, String realmName, String loginPage, String errorPage)`
Construct a new LoginConfig with the specified properties.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getAuthMethod()`
Get the authentication method.
`String`
`getErrorPage()`
Get the error page URI.
`String`
`getLoginPage()`
Get the login page URI.
`String`
`getRealmName()`
Get the realm name.
`int`
`hashCode()`
`void`
`setAuthMethod(String authMethod)`
Set the authentication method.
`void`
`setErrorPage(String errorPage)`
Set the error page URI.
`void`
`setErrorPageDecoded(String errorPage)`
Set the already decoded error page URI.
`void`
`setLoginPage(String loginPage)`
Set the login page URI.
`void`
`setLoginPageDecoded(String loginPage)`
Set the already decoded login page URI.
`void`
`setRealmName(String realmName)`
Set the realm name.
`String`
`toString()`
Return a String representation of this object.

### Methods inherited from class XmlEncodingBase

`getCharset, setCharset`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### LoginConfig

public LoginConfig()
Construct a new LoginConfig with default properties.

### LoginConfig

public LoginConfig(String authMethod, String realmName, String loginPage, String errorPage)
Construct a new LoginConfig with the specified properties.

Parameters:
  `authMethod` - The authentication method
  `realmName` - The realm name
  `loginPage` - The login page URI
  `errorPage` - The error page URI

## Method Details

### getAuthMethod

public String getAuthMethod()
Get the authentication method.

Returns:
  the authMethod

### setAuthMethod

public void setAuthMethod(String authMethod)
Set the authentication method.

Parameters:
  `authMethod` - the authMethod to set

### getErrorPage

public String getErrorPage()
Get the error page URI.

Returns:
  the errorPage

### setErrorPage

public void setErrorPage(String errorPage)
Set the error page URI.

Parameters:
  `errorPage` - the errorPage to set

### setErrorPageDecoded

public void setErrorPageDecoded(String errorPage)
Set the already decoded error page URI.

Parameters:
  `errorPage` - the decoded errorPage to set

### getLoginPage

public String getLoginPage()
Get the login page URI.

Returns:
  the loginPage

### setLoginPage

public void setLoginPage(String loginPage)
Set the login page URI.

Parameters:
  `loginPage` - the loginPage to set

### setLoginPageDecoded

public void setLoginPageDecoded(String loginPage)
Set the already decoded login page URI.

Parameters:
  `loginPage` - the decoded loginPage to set

### getRealmName

public String getRealmName()
Get the realm name.

Returns:
  the realmName

### setRealmName

public void setRealmName(String realmName)
Set the realm name.

Parameters:
  `realmName` - the realmName to set

### toString

public String toString()
Return a String representation of this object.

Overrides:
  `toString` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`