Top Description Fields Constructors Methods
com.oracle.bmc.auth.internal

public Class FixedContentResourcePrincipalFederationClient

extends Object
implements FederationClient, ProvidesConfigurableRefresh
Class Inheritance
All Implemented Interfaces
com.oracle.bmc.auth.ProvidesConfigurableRefresh, com.oracle.bmc.auth.internal.FederationClient
Imports
com.oracle.bmc.auth.ProvidesConfigurableRefresh, .SessionKeySupplier, com.oracle.bmc.util.internal.Validate, org.slf4j.Logger, java.time.Duration, java.util.Optional

This class returns a security token, supplied as a fixed value.

Field Summary

Modifier and TypeField and Description
private static final Logger
private final SecurityTokenAdapter
private final SessionKeySupplier

Constructor Summary

AccessConstructor and Description
public
FixedContentResourcePrincipalFederationClient(String
the constant value for the RPST
resourcePrincipalSessionToken
,
SessionKeySupplier
the associated SessionKeySupplier
sessionKeySupplier
)

Constructor of FixedContentResourcePrincipalFederationClient.

Method Summary

Modifier and TypeMethod and Description
public String
getSecurityToken()

Implements com.oracle.bmc.auth.internal.FederationClient.getSecurityToken.

Gets a security token from the federation endpoint.

public String
getStringClaim(String key)

Implements com.oracle.bmc.auth.internal.FederationClient.getStringClaim.

Get a claim embedded in the security token.

public String
refreshAndGetSecurityToken()

Implements com.oracle.bmc.auth.internal.FederationClient.refreshAndGetSecurityToken.

Gets a security token from the federation endpoint.

public String
refreshAndGetSecurityTokenIfExpiringWithin(Duration
the duration to check
time
,
boolean
boolean value to enable/disable refresh of keys
refreshKeys
)

Implements com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Gets a security token from the federation endpoint if the security token expires within the provided duration and allows to enable/disable refresh of keys.

public String
refreshAndGetSecurityTokenIfExpiringWithin(Duration
the duration to check
time
)

Implements com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Gets a security token from the federation endpoint if the security token expires within the provided duration.

private String
refreshAndGetSecurityTokenInner(final boolean doFinalTokenValidityCheck, Optional<Duration> time, boolean refreshKeys)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG
securityTokenAdapterback to summary
private final SecurityTokenAdapter securityTokenAdapter
sessionKeySupplierback to summary
private final SessionKeySupplier sessionKeySupplier

Constructor Detail

FixedContentResourcePrincipalFederationClientback to summary
public FixedContentResourcePrincipalFederationClient(String resourcePrincipalSessionToken, SessionKeySupplier sessionKeySupplier)

Constructor of FixedContentResourcePrincipalFederationClient.

Parameters
resourcePrincipalSessionToken:String

the constant value for the RPST

sessionKeySupplier:SessionKeySupplier

the associated SessionKeySupplier

Method Detail

getSecurityTokenback to summary
public String getSecurityToken()

Implements com.oracle.bmc.auth.internal.FederationClient.getSecurityToken.

Doc from com.oracle.bmc.auth.internal.FederationClient.getSecurityToken.

Gets a security token from the federation endpoint. May use a cached token if it judged to still be valid.

Returns:String

A security token that can be used to authenticate requests.

Annotations
@Override
getStringClaimback to summary
public String getStringClaim(String key)

Implements com.oracle.bmc.auth.internal.FederationClient.getStringClaim.

Doc from com.oracle.bmc.auth.internal.FederationClient.getStringClaim.

Get a claim embedded in the security token. May use the cached token if it is judged to still be valid.

Annotations
@Override
refreshAndGetSecurityTokenback to summary
public String refreshAndGetSecurityToken()

Implements com.oracle.bmc.auth.internal.FederationClient.refreshAndGetSecurityToken.

Doc from com.oracle.bmc.auth.internal.FederationClient.refreshAndGetSecurityToken.

Gets a security token from the federation endpoint. This will always retreive a new token from the federation endpoint and does not use a cached token.

Returns:String

A security token that can be used to authenticate requests.

Annotations
@Override
refreshAndGetSecurityTokenIfExpiringWithinback to summary
public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time, boolean refreshKeys)

Implements com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Doc from com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Gets a security token from the federation endpoint if the security token expires within the provided duration and allows to enable/disable refresh of keys. This will always retrieve a new token from the federation endpoint and does not use a cached token.

Parameters
time:Duration

the duration to check

refreshKeys:boolean

boolean value to enable/disable refresh of keys

Returns:String

A security token that can be used to authenticate requests.

Annotations
@Override
refreshAndGetSecurityTokenIfExpiringWithinback to summary
public String refreshAndGetSecurityTokenIfExpiringWithin(Duration time)

Implements com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Doc from com.oracle.bmc.auth.ProvidesConfigurableRefresh.refreshAndGetSecurityTokenIfExpiringWithin.

Gets a security token from the federation endpoint if the security token expires within the provided duration. This will always retrieve a new token from the federation endpoint and does not use a cached token.

Parameters
time:Duration

the duration to check

Returns:String

A security token that can be used to authenticate requests.

Annotations
@Override
refreshAndGetSecurityTokenInnerback to summary
private String refreshAndGetSecurityTokenInner(final boolean doFinalTokenValidityCheck, Optional<Duration> time, boolean refreshKeys)