2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.security
;
18 import org
.springframework
.security
.GrantedAuthority
;
19 import org
.springframework
.security
.providers
.UsernamePasswordAuthenticationToken
;
21 /** Credentials required for the authentication to a node. */
22 public class NodeAuthenticationToken
extends
23 UsernamePasswordAuthenticationToken
{
24 private static final long serialVersionUID
= 1955222132884795213L;
25 private final String url
;
27 /** Non authenticated local constructor */
28 public NodeAuthenticationToken(Object principal
, Object credentials
) {
29 super(principal
, credentials
);
33 /** Non authenticated remote constructor */
34 public NodeAuthenticationToken(Object principal
, Object credentials
,
36 super(principal
, credentials
);
40 /** Authenticated constructor */
41 public NodeAuthenticationToken(NodeAuthenticationToken sat
,
42 GrantedAuthority
[] authorities
) {
43 super(sat
.getPrincipal(), sat
.getCredentials(), authorities
);
44 this.url
= sat
.getUrl();
47 public String
getUrl() {
51 public Boolean
isRemote() {