# Class PrivateKeyCallback

java.lang.Object
jakarta.security.auth.message.callback.PrivateKeyCallback

All Implemented Interfaces:
  `Callback`

public class PrivateKeyCallback extends Object implements Callback
Callback that enables an authentication module to request a certificate chain and private key from the runtime. The information specifying the chain and key may be an alias, a digest, a subject key, or an issuer ID. Other request types may be supported.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`PrivateKeyCallback.AliasRequest`
`static class`
`PrivateKeyCallback.DigestRequest`
`static class`
`PrivateKeyCallback.IssuerSerialNumRequest`
`static interface`
`PrivateKeyCallback.Request`
`static class`
`PrivateKeyCallback.SubjectKeyIDRequest`

## Constructor Summary

Constructors
Constructor
Description
`PrivateKeyCallback(PrivateKeyCallback.Request request)`

## Method Summary

Modifier and Type
Method
Description
`Certificate[]`
`getChain()`
`PrivateKey`
`getKey()`
`PrivateKeyCallback.Request`
`getRequest()`
`void`
`setKey(PrivateKey key, Certificate[] chain)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PrivateKeyCallback

public PrivateKeyCallback(PrivateKeyCallback.Request request)

## Method Details

### getRequest

public PrivateKeyCallback.Request getRequest()

### setKey

public void setKey(PrivateKey key, Certificate[] chain)

### getKey

public PrivateKey getKey()

### getChain

public Certificate[] getChain()