1package org.apache.archiva.redback.authentication;
2/*3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 */2021import org.apache.archiva.redback.users.User;
2223import java.io.Serializable;
2425/**26 * detail on possible authentication failure.27 *28 * @author Olivier Lamy29 * @since 1.4-M430 */31publicclassAuthenticationFailureCause32implements Serializable
33 {
34privateint cause;
3536private String message;
3738privateUser user;
3940publicAuthenticationFailureCause( int cause, String message )
41 {
42this.cause = cause;
43this.message = message;
44 }
4546publicint getCause()
47 {
48return cause;
49 }
5051publicvoid setCause( int cause )
52 {
53this.cause = cause;
54 }
5556public String getMessage()
57 {
58return message;
59 }
6061publicvoid setMessage( String message )
62 {
63this.message = message;
64 }
6566publicUser getUser()
67 {
68return user;
69 }
7071publicAuthenticationFailureCause user ( User user)
72 {
73this.user = user;
74returnthis;
75 }
7677publicvoid setUser( User user )
78 {
79this.user = user;
80 }
8182 @Override
83public String toString()
84 {
85final StringBuilder sb = new StringBuilder();
86 sb.append( "AuthenticationFailureCause" );
87 sb.append( "{cause=" ).append( cause );
88 sb.append( ", message='" ).append( message ).append( '\'' );
89 sb.append( '}' );
90return sb.toString();
91 }
92 }