APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.jgss.krb5

public Class Krb5InitCredential

extends KerberosTicket
implements Krb5CredElement
Class Inheritance
All Implemented Interfaces
sun.security.jgss.krb5.Krb5CredElement, sun.security.jgss.spi.GSSCredentialSpi
Imports
org.ietf.jgss.*, sun.security.jgss.GSSCaller, sun.security.jgss.spi.*, sun.security.krb5.*, javax.security.auth.kerberos.KerberosTicket, .KerberosPrincipal, java.io.Serial, .InvalidObjectException, .IOException, .ObjectInputStream, java.net.InetAddress, java.util.Date, javax.security.auth.login.LoginException

Implements the krb5 initiator credential element.
Authors
Mayank Upadhyay, Ram Marti
Since
1.4

Field Summary

Modifier and TypeField and Description
private final Credentials
private final Krb5NameElement
public KerberosTicket
private static final long

Constructor Summary

AccessConstructor and Description
private
Krb5InitCredential(Krb5NameElement name, byte[] asn1Encoding, KerberosPrincipal client, KerberosPrincipal clientAlias, KerberosPrincipal server, KerberosPrincipal serverAlias, byte[] sessionKey, int keyType, boolean[] flags, Date authTime, Date startTime, Date endTime, Date renewTill, InetAddress[] clientAddresses)

private
Krb5InitCredential(Krb5NameElement name, Credentials delegatedCred, byte[] asn1Encoding, KerberosPrincipal client, KerberosPrincipal clientAlias, KerberosPrincipal server, KerberosPrincipal serverAlias, byte[] sessionKey, int keyType, boolean[] flags, Date authTime, Date startTime, Date endTime, Date renewTill, InetAddress[] clientAddresses)

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements sun.security.jgss.spi.GSSCredentialSpi.dispose.

Called to invalidate this credential element.

public int

Returns:

the accept lifetime remaining in seconds
getAcceptLifetime
()

Implements sun.security.jgss.spi.GSSCredentialSpi.getAcceptLifetime.

Returns the accept lifetime remaining.

public int

Returns:

the init lifetime remaining in seconds
getInitLifetime
()

Implements sun.security.jgss.spi.GSSCredentialSpi.getInitLifetime.

Returns the init lifetime remaining.

pack-priv static Krb5InitCredential
getInstance(GSSCaller caller, Krb5NameElement name, int initLifetime)

pack-priv static Krb5InitCredential
pack-priv Credentials
getKrb5Credentials()

Returns a sun.security.krb5.Credentials instance so that it maybe used in that package for th Kerberos protocol.

public final Oid

Returns:

the Oid for this credential mechanism
getMechanism
()

Implements sun.security.jgss.spi.GSSCredentialSpi.getMechanism.

Returns the oid representing the underlying credential mechanism oid.

public final GSSNameSpi

Returns:

GSSNameSpi representing principal name of this credential
getName
()

Implements sun.security.jgss.spi.GSSCredentialSpi.getName.

Returns the principal name for this credential.

public final Provider
private static KerberosTicket
getTgt(GSSCaller caller, Krb5NameElement name, int initLifetime)

public GSSCredentialSpi
impersonate(GSSNameSpi name)

Implements sun.security.jgss.spi.GSSCredentialSpi.impersonate.

Impersonates another client.

public boolean
isAcceptorCredential()

Implements sun.security.jgss.spi.GSSCredentialSpi.isAcceptorCredential.

Determines if this credential element can be used by a context acceptor.

public boolean
isInitiatorCredential()

Implements sun.security.jgss.spi.GSSCredentialSpi.isInitiatorCredential.

Determines if this credential element can be used by a context initiator.

private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
stream
)

Hides javax.security.auth.kerberos.KerberosTicket.readObject.

Restores the state of this object from the stream.

Inherited from javax.security.auth.kerberos.KerberosTicket:
destroyequalsgetAuthTimegetClientgetClientAddressesgetEncodedgetEndTimegetFlagsgetRenewTillgetServergetSessionKeygetSessionKeyTypegetStartTimehashCodeisCurrentisDestroyedisForwardableisForwardedisInitialisPostdatedisProxiableisProxyisRenewablerefreshtoString

Field Detail

krb5Credentialsback to summary
private final Credentials krb5Credentials
Annotations
@SuppressWarnings:serial
nameback to summary
private final Krb5NameElement name
Annotations
@SuppressWarnings:serial
proxyTicketback to summary
public KerberosTicket proxyTicket
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.security.auth.kerberos.KerberosTicket.serialVersionUID.

Annotations
@Serial

Constructor Detail

Krb5InitCredentialback to summary
private Krb5InitCredential(Krb5NameElement name, byte[] asn1Encoding, KerberosPrincipal client, KerberosPrincipal clientAlias, KerberosPrincipal server, KerberosPrincipal serverAlias, byte[] sessionKey, int keyType, boolean[] flags, Date authTime, Date startTime, Date endTime, Date renewTill, InetAddress[] clientAddresses) throws GSSException
Krb5InitCredentialback to summary
private Krb5InitCredential(Krb5NameElement name, Credentials delegatedCred, byte[] asn1Encoding, KerberosPrincipal client, KerberosPrincipal clientAlias, KerberosPrincipal server, KerberosPrincipal serverAlias, byte[] sessionKey, int keyType, boolean[] flags, Date authTime, Date startTime, Date endTime, Date renewTill, InetAddress[] clientAddresses) throws GSSException

Method Detail

disposeback to summary
public void dispose() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.dispose.

Called to invalidate this credential element.

Exceptions
GSSException:

Doc from sun.security.jgss.spi.GSSCredentialSpi.dispose.

with major codes NO_CRED and FAILURE

getAcceptLifetimeback to summary
public int getAcceptLifetime() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.getAcceptLifetime.

Returns the accept lifetime remaining.

Returns:int

the accept lifetime remaining in seconds

Exceptions
GSSException:
may be thrown
getInitLifetimeback to summary
public int getInitLifetime() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.getInitLifetime.

Returns the init lifetime remaining.

Returns:int

the init lifetime remaining in seconds

Exceptions
GSSException:
may be thrown
getInstanceback to summary
pack-priv static Krb5InitCredential getInstance(GSSCaller caller, Krb5NameElement name, int initLifetime) throws GSSException
getInstanceback to summary
pack-priv static Krb5InitCredential getInstance(Krb5NameElement name, Credentials delegatedCred) throws GSSException
getKrb5Credentialsback to summary
pack-priv Credentials getKrb5Credentials()

Returns a sun.security.krb5.Credentials instance so that it maybe used in that package for th Kerberos protocol.

getMechanismback to summary
public final Oid getMechanism()

Implements sun.security.jgss.spi.GSSCredentialSpi.getMechanism.

Returns the oid representing the underlying credential mechanism oid.

Returns:Oid

the Oid for this credential mechanism

Exceptions
GSSException:
may be thrown
getNameback to summary
public final GSSNameSpi getName() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.getName.

Returns the principal name for this credential. The name is in mechanism specific format.

Returns:GSSNameSpi

GSSNameSpi representing principal name of this credential

Exceptions
GSSException:
may be thrown
getProviderback to summary
public final Provider getProvider()

Implements sun.security.jgss.spi.GSSCredentialSpi.getProvider.

getTgtback to summary
private static KerberosTicket getTgt(GSSCaller caller, Krb5NameElement name, int initLifetime) throws GSSException
impersonateback to summary
public GSSCredentialSpi impersonate(GSSNameSpi name) throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.impersonate.

Doc from sun.security.jgss.spi.GSSCredentialSpi.impersonate.

Impersonates another client.

Annotations
@Override
Exceptions
GSSException:
may be thrown
isAcceptorCredentialback to summary
public boolean isAcceptorCredential() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.isAcceptorCredential.

Doc from sun.security.jgss.spi.GSSCredentialSpi.isAcceptorCredential.

Determines if this credential element can be used by a context acceptor.

isInitiatorCredentialback to summary
public boolean isInitiatorCredential() throws GSSException

Implements sun.security.jgss.spi.GSSCredentialSpi.isInitiatorCredential.

Doc from sun.security.jgss.spi.GSSCredentialSpi.isInitiatorCredential.

Determines if this credential element can be used by a context initiator.

readObjectback to summary
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException

Hides javax.security.auth.kerberos.KerberosTicket.readObject.

Restores the state of this object from the stream.

Parameters
stream:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded