public void setClientSecret(final byte[] secret) throws OAuth2EncryptionException { this.clientSecret = secret; if (this.encrypter != null) { this.encryptedSecret = this.encrypter.encrypt(secret); } }
public void setMacSecret(final byte[] secret) throws OAuth2RequestException { this.macSecret = secret; try { this.encryptedMacSecret = this.encrypter == null ? secret : this.encrypter.encrypt(secret); } catch (final OAuth2EncryptionException e) { throw new OAuth2RequestException(OAuth2Error.SECRET_ENCRYPTION_PROBLEM, "OAuth2TokenPersistence could not encrypt the mac secret", e); } }
public void setSecret(final byte[] secret) throws OAuth2RequestException { this.secret = secret; try { this.encryptedSecret = this.encrypter == null ? secret : this.encrypter.encrypt(secret); } catch (final OAuth2EncryptionException e) { throw new OAuth2RequestException(OAuth2Error.SECRET_ENCRYPTION_PROBLEM, "OAuth2TokenPersistence could not encrypt the token secret", e); } }