Package net.shibboleth.idp.saml.nameid.impl

# Class TransientIdParameters

java.lang.Object
net.shibboleth.idp.saml.nameid.impl.TransientIdParameters

public class TransientIdParameters extends Object
The Parameters we need to store in, and get out of a transient ID, namely the attribute recipient (aka the SP) and the principal. Having this as a separate class allows streamlining of the encoding/decoding.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final String`
`ATTRIBUTE_RECIPIENT_FIELD`
Field name of creation instant.
`private final String`
`attributeRecipient`
The Attribute Recipient.
`static final String`
`CONTEXT`
Context label for storage of IDs.
`private final org.slf4j.Logger`
`log`
Class logger.
`private final String`
`principal`
The principal.
`private static final String`
`PRINCIPAL_FIELD`
Field name of principal name.

## Constructor Summary

Constructors
Constructor
Description
`TransientIdParameters(String encoded)`
Constructor for the decoding definitions.
`TransientIdParameters(String recipient, String thePrincipal)`
Constructor for the attribute definition.

## Method Summary

Modifier and Type
Method
Description
`String`
`encode()`
Encode up for storing.
`String`
`getAttributeRecipient()`
Get the SP.
`String`
`getPrincipal()`
Get the Principal.

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

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

## Field Details

### CONTEXT

@Nonnull @NotEmpty public static final String CONTEXT
Context label for storage of IDs.

See Also:
  - Constant Field Values

### ATTRIBUTE_RECIPIENT_FIELD

@Nonnull @NotEmpty private static final String ATTRIBUTE_RECIPIENT_FIELD
Field name of creation instant.

See Also:
  - Constant Field Values

### PRINCIPAL_FIELD

@Nonnull @NotEmpty private static final String PRINCIPAL_FIELD
Field name of principal name.

See Also:
  - Constant Field Values

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### attributeRecipient

@Nullable private final String attributeRecipient
The Attribute Recipient.

### principal

@Nullable private final String principal
The principal.

## Constructor Details

### TransientIdParameters

public TransientIdParameters(@Nullable String recipient, @Nullable String thePrincipal)
Constructor for the attribute definition.

Parameters:
  `recipient` - the SP
  `thePrincipal` - the user

### TransientIdParameters

public TransientIdParameters(@Nonnull @NotEmpty String encoded) throws IOException
Constructor for the decoding definitions.

Parameters:
  `encoded` - the JSON encoded data
Throws:
  `IOException` - if decoding failed

## Method Details

### getAttributeRecipient

@Nullable public String getAttributeRecipient()
Get the SP.

Returns:
  the sp.

### getPrincipal

@Nullable public String getPrincipal()
Get the Principal.

Returns:
  the principal

### encode

@Nonnull public String encode() throws IOException
Encode up for storing.

Returns:
  the encoded string.
Throws:
  `IOException` - if encoding failed