@ Override protected boolean shouldEncryptTokenFor ( final OidcRegisteredService svc ) { if ( AlgorithmIdentifiers . NONE . equalsIgnoreCase ( svc . getIdTokenEncryptionAlg ( ) ) ) { LOGGER . warn ( "ID token encryption algorithm is set to none for [{}] and ID token will not be encrypted" , svc . getServiceId ( ) ) ; return false ; } return svc . isEncryptIdToken ( ) && StringUtils . isNotBlank ( svc . getIdTokenEncryptionAlg ( ) ) && StringUtils . isNotBlank ( svc . getIdTokenEncryptionEncoding ( ) ) ; }
Should encrypt token for service?