55b5b61f57d5f97d55da034d4282d13e70a8dbfb
[moon.git] /
1 /*
2  * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.aaa.sts;
10
11 import javax.servlet.http.HttpServletRequest;
12 import org.apache.oltu.oauth2.common.OAuth;
13 import org.apache.oltu.oauth2.common.validators.AbstractValidator;
14
15 /**
16  * A password validator that does not enforce client identification.
17  *
18  * @author liemmn
19  *
20  */
21 public class AnonymousPasswordValidator extends AbstractValidator<HttpServletRequest> {
22
23     public AnonymousPasswordValidator() {
24         requiredParams.add(OAuth.OAUTH_GRANT_TYPE);
25         requiredParams.add(OAuth.OAUTH_USERNAME);
26         requiredParams.add(OAuth.OAUTH_PASSWORD);
27
28         enforceClientAuthentication = false;
29     }
30 }