public class SSITokenV1Generator extends Object implements ISSITokenGenerator<SSITokenV1Metadata>
Constructor and Description |
---|
SSITokenV1Generator() |
Modifier and Type | Method and Description |
---|---|
SSIToken |
generateToken(@NonNull Link link,
@NonNull ProductInfo productInfo)
|
SSIToken |
generateToken(@NonNull Link link,
@NonNull ProductInfo productInfo,
@NonNull SSITokenV1Metadata tokenMetadata)
|
Map<String,SSIToken> |
generateTokens(@NonNull List<Link> links,
@NonNull ProductInfo productInfo)
Bulk variant of
ISSITokenGenerator.generateToken(Link, ProductInfo) method which
supports generation of SSITokens for multiple links. |
SSITokenSchema |
getTokenSchema()
Returns
SSITokenSchema implemented by an instance. |
public SSITokenSchema getTokenSchema()
ISSITokenGenerator
SSITokenSchema
implemented by an instance.getTokenSchema
in interface ISSITokenGenerator<SSITokenV1Metadata>
SSITokenSchema
.public SSIToken generateToken(@NonNull @NonNull Link link, @NonNull @NonNull ProductInfo productInfo) throws TokenException
ISSITokenGenerator
generateToken
in interface ISSITokenGenerator<SSITokenV1Metadata>
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.public Map<String,SSIToken> generateTokens(@NonNull @NonNull List<Link> links, @NonNull @NonNull ProductInfo productInfo) throws TokenException
ISSITokenGenerator
ISSITokenGenerator.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.
generateTokens
in interface ISSITokenGenerator<SSITokenV1Metadata>
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.public SSIToken generateToken(@NonNull @NonNull Link link, @NonNull @NonNull ProductInfo productInfo, @NonNull @NonNull SSITokenV1Metadata tokenMetadata) throws TokenException
ISSITokenGenerator
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.
generateToken
in interface ISSITokenGenerator<SSITokenV1Metadata>
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.