picketlink/src/main/java/org/wildfly/extension/picketlink/federation/service/EntityProviderService.java
private void configureTokenProviders() {
        STSType stsType = getFederationService().getValue().getStsType();

        if (stsType != null) {
            int tokenTimeout = stsType.getTokenTimeout();
            int clockSkew = stsType.getClockSkew();

            STSType providerStsType = getPicketLinkType().getStsType();

            providerStsType.setTokenTimeout(tokenTimeout);
            providerStsType.setClockSkew(clockSkew);

            List<TokenProviderType> tokenProviders = providerStsType.getTokenProviders().getTokenProvider();

            for (TokenProviderType tokenProviderType : tokenProviders) {
                if (tokenProviderType.getTokenType().equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())) {
                    KeyValueType keyValueTypeTokenTimeout = new KeyValueType();

                    keyValueTypeTokenTimeout.setKey(GeneralConstants.ASSERTIONS_VALIDITY);
                    keyValueTypeTokenTimeout.setValue(String.valueOf(tokenTimeout));

                    KeyValueType keyValueTypeClockSkew = new KeyValueType();

                    keyValueTypeClockSkew.setKey(GeneralConstants.CLOCK_SKEW);
                    keyValueTypeClockSkew.setValue(String.valueOf(clockSkew));

                    tokenProviderType.add(keyValueTypeTokenTimeout);
                    tokenProviderType.add(keyValueTypeClockSkew);
                }
            }
        }
    }
private void configureTokenProviders() {
        STSType stsType = getFederationService().getValue().getStsType();

        if (stsType != null) {
            int tokenTimeout = stsType.getTokenTimeout();
            int clockSkew = stsType.getClockSkew();

            STSType providerStsType = getPicketLinkType().getStsType();

            providerStsType.setTokenTimeout(tokenTimeout);
            providerStsType.setClockSkew(clockSkew);

            List<TokenProviderType> tokenProviders = providerStsType.getTokenProviders().getTokenProvider();

            for (TokenProviderType tokenProviderType : tokenProviders) {
                if (tokenProviderType.getTokenType().equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())) {
                    KeyValueType keyValueTypeTokenTimeout = new KeyValueType();

                    keyValueTypeTokenTimeout.setKey(GeneralConstants.ASSERTIONS_VALIDITY);
                    keyValueTypeTokenTimeout.setValue(String.valueOf(tokenTimeout));

                    KeyValueType keyValueTypeClockSkew = new KeyValueType();

                    keyValueTypeClockSkew.setKey(GeneralConstants.CLOCK_SKEW);
                    keyValueTypeClockSkew.setValue(String.valueOf(clockSkew));

                    tokenProviderType.add(keyValueTypeTokenTimeout);
                    tokenProviderType.add(keyValueTypeClockSkew);
                }
            }
        }
    }
private void configureTokenProviders ( ) { STSType stsType = getFederationService ( ) . getValue ( ) . getStsType ( ) ; if ( stsType != null ) { int tokenTimeout = stsType . getTokenTimeout ( ) ; int clockSkew = stsType . getClockSkew ( ) ; STSType providerStsType = getPicketLinkType ( ) . getStsType ( ) ; providerStsType . setTokenTimeout ( tokenTimeout ) ; providerStsType . setClockSkew ( clockSkew ) ; List < TokenProviderType > tokenProviders = providerStsType . getTokenProviders ( ) . getTokenProvider ( ) ; for ( TokenProviderType tokenProviderType : tokenProviders ) { if ( tokenProviderType . getTokenType ( ) . equals ( JBossSAMLURIConstants . ASSERTION_NSURI . get ( ) ) ) { KeyValueType keyValueTypeTokenTimeout = new KeyValueType ( ) ; keyValueTypeTokenTimeout . setKey ( GeneralConstants . ASSERTIONS_VALIDITY ) ; keyValueTypeTokenTimeout . setValue ( String . valueOf ( tokenTimeout ) ) ; KeyValueType keyValueTypeClockSkew = new KeyValueType ( ) ; keyValueTypeClockSkew . setKey ( GeneralConstants . CLOCK_SKEW ) ; keyValueTypeClockSkew . setValue ( String . valueOf ( clockSkew ) ) ; tokenProviderType . add ( keyValueTypeTokenTimeout ) ; tokenProviderType . add ( keyValueTypeClockSkew ) ; } } } }
<p> Configure the STS Token Providers. </p>
<p > Configure the STS Token Providers . < / p >