<commit_before>/*
 * Copyright 2006-2008 Web Cohesion
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.codehaus.enunciate.modules.spring_app.config.security;

/**
 * Configuration for a form-based login.
 *
 * @author <NAME>
 */
public class FormBasedLoginConfig {

  private String url = "/form/login";
  private String redirectOnSuccessUrl = "/";
  private String redirectOnFailureUrl = "/login.jsp";
  private String loginPageURL = "login.jsp";
  private String loginPageFile;

  /**
   * The URL of the form-based login endpoint.
   *
   * @return The URL of the form-based login endpoint.
   */
  public String getUrl() {
    return url;
  }

  /**
   * The URL of the form-based login endpoint.
   *
   * @param url The URL of the form-based login endpoint.
   */
  public void setUrl(String url) {
    this.url = url;
  }

  /**
   * The URL to which to redirect on login success.
   *
   * @return The URL to which to redirect on login success.
   */
  public String getRedirectOnSuccessUrl() {
    return redirectOnSuccessUrl;
  }

  /**
   * The URL to which to redirect on login success.
   *
   * @param redirectOnSuccessUrl The URL to which to redirect on login success.
   */
  public void setRedirectOnSuccessUrl(String redirectOnSuccessUrl) {
    this.redirectOnSuccessUrl = redirectOnSuccessUrl;
  }

  /**
   * The URL to which to redirect on login failure.
   *
   * @return The URL to which to redirect on login failure.
   */
  public String getRedirectOnFailureUrl() {
    return redirectOnFailureUrl;
  }

  /**
   * The URL to which to redirect on login failure.
   *
   * @param redirectOnFailureUrl The URL to which to redirect on login failure.
   */
  public void setRedirectOnFailureUrl(String redirectOnFailureUrl) {
    this.redirectOnFailureUrl = redirectOnFailureUrl;
  }

  /**
   * The URL of the login page.
   *
   * @return The URL of the login page.
   */
  public String getLoginPageURL() {
    return loginPageURL;
  }

  /**
   * The URL of the login page.
   *
   * @param loginPageURL The URL of the login page.
   */
  public void setLoginPageURL(String loginPageURL) {
    this.loginPageURL = loginPageURL;
  }

  /**
   * File to be used as the login page.
   *
   * @return File to be used as the login page.
   */
  public String getLoginPageFile() {
    return loginPageFile;
  }

  /**
   * File to be used as the login page.
   *
   * @param loginPageFile File to be used as the login page.
   */
  public void setLoginPageFile(String loginPageFile) {
    this.loginPageFile = loginPageFile;
  }
}<commit_msg>loginPageURL should be prefixed with a / to follow servlet spec. Invalid <url-pattern> login.jsp in servlet mapping<commit_after>/*
 * Copyright 2006-2008 Web Cohesion
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.codehaus.enunciate.modules.spring_app.config.security;

/**
 * Configuration for a form-based login.
 *
 * @author <NAME>
 */
public class FormBasedLoginConfig {

  private String url = "/form/login";
  private String redirectOnSuccessUrl = "/";
  private String redirectOnFailureUrl = "/login.jsp";
  private String loginPageURL = "/login.jsp";
  private String loginPageFile;

  /**
   * The URL of the form-based login endpoint.
   *
   * @return The URL of the form-based login endpoint.
   */
  public String getUrl() {
    return url;
  }

  /**
   * The URL of the form-based login endpoint.
   *
   * @param url The URL of the form-based login endpoint.
   */
  public void setUrl(String url) {
    this.url = url;
  }

  /**
   * The URL to which to redirect on login success.
   *
   * @return The URL to which to redirect on login success.
   */
  public String getRedirectOnSuccessUrl() {
    return redirectOnSuccessUrl;
  }

  /**
   * The URL to which to redirect on login success.
   *
   * @param redirectOnSuccessUrl The URL to which to redirect on login success.
   */
  public void setRedirectOnSuccessUrl(String redirectOnSuccessUrl) {
    this.redirectOnSuccessUrl = redirectOnSuccessUrl;
  }

  /**
   * The URL to which to redirect on login failure.
   *
   * @return The URL to which to redirect on login failure.
   */
  public String getRedirectOnFailureUrl() {
    return redirectOnFailureUrl;
  }

  /**
   * The URL to which to redirect on login failure.
   *
   * @param redirectOnFailureUrl The URL to which to redirect on login failure.
   */
  public void setRedirectOnFailureUrl(String redirectOnFailureUrl) {
    this.redirectOnFailureUrl = redirectOnFailureUrl;
  }

  /**
   * The URL of the login page.
   *
   * @return The URL of the login page.
   */
  public String getLoginPageURL() {
    return loginPageURL;
  }

  /**
   * The URL of the login page.
   *
   * @param loginPageURL The URL of the login page.
   */
  public void setLoginPageURL(String loginPageURL) {
    this.loginPageURL = loginPageURL;
  }

  /**
   * File to be used as the login page.
   *
   * @return File to be used as the login page.
   */
  public String getLoginPageFile() {
    return loginPageFile;
  }

  /**
   * File to be used as the login page.
   *
   * @param loginPageFile File to be used as the login page.
   */
  public void setLoginPageFile(String loginPageFile) {
    this.loginPageFile = loginPageFile;
  }
}
{'fraction_non_alphanumeric': 0.08528614697911685, 'fraction_numerical': 0.003825920612147298, 'mean_word_length': 2.9558638083228246, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7666285', 'n_tokens_mistral': 1835, 'n_tokens_neox': 1795, 'n_words': 693}