Example usage for org.apache.shiro.web.filter.authc FormAuthenticationFilter setUsernameParam

List of usage examples for org.apache.shiro.web.filter.authc FormAuthenticationFilter setUsernameParam

Introduction

In this page you can find the example usage for org.apache.shiro.web.filter.authc FormAuthenticationFilter setUsernameParam.

Prototype

public void setUsernameParam(String usernameParam) 

Source Link

Document

Sets the request parameter name to look for when acquiring the username.

Usage

From source file:org.panifex.security.shiro.SecurityFilterImpl.java

License:Open Source License

protected void bindUsernameParamToFormAuthenticationFilter() {
    FormAuthenticationFilter formAuthenticationFilter = getFormAuthenticationFilter();

    if (formAuthenticationFilter != null) {
        log.debug("Bind username param {}", usernameParam);
        formAuthenticationFilter.setUsernameParam(usernameParam);
    }/*from ww  w. java 2 s . co m*/
}

From source file:org.panifex.security.shiro.SecurityFilterImplTest.java

License:Open Source License

private void expectSettingUsernameParam(String usernameParam) {
    FormAuthenticationFilter filterMock = expectGettingFormAuthenticationFilter();

    // expect setting username param
    filterMock.setUsernameParam(usernameParam);
}