Package net.shibboleth.idp.cas.ticket

# Class TicketPrincipalLookupFunction

java.lang.Object
net.shibboleth.idp.cas.ticket.TicketPrincipalLookupFunction

All Implemented Interfaces:
  `Function<ProfileRequestContext,String>`

public class TicketPrincipalLookupFunction extends Object implements Function<ProfileRequestContext,String>
Looks up a principal name stored in a CAS ticket: `ProfileRequestContext` -> `ProtocolContext` -> `TicketContext` -> `Ticket.getTicketState()` -> `TicketState.getPrincipalName()`.

Since:
  3.3.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,TicketContext>`
`ticketContextLookupFunction`
Ticket context lookup function.

## Constructor Summary

Constructors
Constructor
Description
`TicketPrincipalLookupFunction()`

## Method Summary

Modifier and Type
Method
Description
`String`
`apply(ProfileRequestContext profileRequestContext)`
`void`
`setTicketContextLookupFunction(Function<ProfileRequestContext,TicketContext> function)`
Sets the function used to retrieve a `TicketContext` from the `ProfileRequestContext`.

### Methods inherited from class java.lang.Object

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

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### ticketContextLookupFunction

@Nonnull private Function<ProfileRequestContext,TicketContext> ticketContextLookupFunction
Ticket context lookup function.

## Constructor Details

### TicketPrincipalLookupFunction

public TicketPrincipalLookupFunction()

## Method Details

### setTicketContextLookupFunction

public void setTicketContextLookupFunction(@Nonnull Function<ProfileRequestContext,TicketContext> function)
Sets the function used to retrieve a `TicketContext` from the `ProfileRequestContext`.

Parameters:
  `function` - Ticket context lookup function.

### apply

@Nullable public String apply(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,String>`