01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.ietf.jgss;
19:
20: public interface GSSCredential extends Cloneable {
21:
22: static final int ACCEPT_ONLY = 2;
23:
24: static final int DEFAULT_LIFETIME = 0;
25:
26: static final int INDEFINITE_LIFETIME = Integer.MAX_VALUE; // 2147483647;
27:
28: static final int INITIATE_AND_ACCEPT = 0;
29:
30: static final int INITIATE_ONLY = 1;
31:
32: void add(GSSName name, int initLifetime, int acceptLifetime,
33: Oid mech, int usage) throws GSSException;
34:
35: void dispose() throws GSSException;
36:
37: boolean equals(Object another);
38:
39: Oid[] getMechs() throws GSSException;
40:
41: GSSName getName() throws GSSException;
42:
43: GSSName getName(Oid mech) throws GSSException;
44:
45: int getRemainingAcceptLifetime(Oid mech) throws GSSException;
46:
47: int getRemainingInitLifetime(Oid mech) throws GSSException;
48:
49: int getRemainingLifetime() throws GSSException;
50:
51: int getUsage() throws GSSException;
52:
53: int getUsage(Oid mech) throws GSSException;
54:
55: int hashCode();
56: }
|