---
title: Developing token processors
description: You can create a token processor by implementing the TokenProcessor interface.
component: pingfederate
version: 13.1
page_id: pingfederate:sdk_developers_guide:pf_develop_token_process
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/sdk_developers_guide/pf_develop_token_process.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: July 5, 2022
---

# Developing token processors

You can create a token processor by implementing the `TokenProcessor` interface.

The following Java packages are required for implementing the `TokenProcessor` interface:

* `org.sourceid.saml20.adapter.attribute`

* `org.sourceid.saml20.adapter.idp.authn`

* `org.sourceid.saml20.adapter.gui`

* `org.sourceid.saml20.adapter.conf`

* `org.sourceid.wstrust.model`

* `org.sourceid.wstrust.plugin`

* `org.sourceid.wstrust.plugin.process`

* `com.pingidentity.sdk`

For each token-processor implementation, in addition to the methods described under [Shared plugin interfaces](pf_share_plugin_interface.html), you must define the `TokenContext processToken(T token)` method.

PingFederate invokes the `processToken()` method when processing a security token service (STS) request to perform necessary operations for determining the validity of a token. The type parameter `T` must extend, at a minimum, the type `SecurityToken`. The type `BinarySecurityToken` is also available to represent custom security tokens that can be transported as Base64-encoded data.
