public interface ISSITokenGenerator<T extends SSITokenMetadata>
ISSITokenGenerator
defines contract for SSI token generation APIs.Modifier and Type | Method and Description |
---|---|
SSIToken |
generateToken(Link link,
ProductInfo productInfo)
|
SSIToken |
generateToken(Link link,
ProductInfo productInfo,
T tokenMetadata)
|
Map<String,SSIToken> |
generateTokens(List<Link> links,
ProductInfo productInfo)
Bulk variant of
generateToken(Link, ProductInfo) method which
supports generation of SSITokens for multiple links. |
SSITokenSchema |
getTokenSchema()
Returns
SSITokenSchema implemented by an instance. |
SSITokenSchema getTokenSchema()
SSITokenSchema
implemented by an instance.SSITokenSchema
.SSIToken generateToken(Link link, ProductInfo productInfo) throws TokenException
link
- Link
object to generate SSIToken for.productInfo
- ProductInfo
object that identifies the target
application.SSIToken
.TokenException
- is thrown to indicate unexpected errors encountered
while generating token.Map<String,SSIToken> generateTokens(List<Link> links, ProductInfo productInfo) throws TokenException
generateToken(Link, ProductInfo)
method which
supports generation of SSITokens for multiple links.
The operation is considered to be a failure in entirety even if SSIToken generation fails for a single Link in the batch.
links
- Collection of Link
objects to generate SSITokens for.
All links passed in the input are expected to belong to the
same Amazon user and the linked partner user accounts must
all belong to the same identity provider.productInfo
- ProductInfo
object that identifies the target
application.TokenException
- is thrown to indicate unexpected errors encountered
while generating token.SSIToken generateToken(Link link, ProductInfo productInfo, T tokenMetadata) throws TokenException
SSIToken
for the given Link
using the values
supplied explicitly by the caller for token metadata fields.
At this point, with "SSI-1.0" being the only supported token schema, this method is expected to be used for testing purpose only, for eg: to generate a token with expiration time in the past.
link
- Link
object to generate SSIToken for.productInfo
- ProductInfo
object that identifies the target
application.tokenMetadata
- SSITokenMetadata
object holding custom
values to use for token metadata fields.SSIToken
.TokenException
- is thrown to indicate unexpected errors encountered
while generating token.