Search in sources :

Example 6 with BasicAuthentication

use of com.redhat.cloud.notifications.models.BasicAuthentication in project notifications-backend by RedHatInsights.

the class BasicAuthenticationConverter method convertToEntityAttribute.

@Override
public BasicAuthentication convertToEntityAttribute(String json) {
    if (json == null) {
        return null;
    } else {
        BasicAuthentication auth = Json.decodeValue(json, BasicAuthentication.class);
        auth.setPassword(Base64Utils.decode(auth.getPassword()));
        return auth;
    }
}
Also used : BasicAuthentication(com.redhat.cloud.notifications.models.BasicAuthentication)

Aggregations

BasicAuthentication (com.redhat.cloud.notifications.models.BasicAuthentication)6 Endpoint (com.redhat.cloud.notifications.models.Endpoint)5 CamelProperties (com.redhat.cloud.notifications.models.CamelProperties)4 DbIsolatedTest (com.redhat.cloud.notifications.db.DbIsolatedTest)3 QuarkusTest (io.quarkus.test.junit.QuarkusTest)3 Header (io.restassured.http.Header)3 JsonObject (io.vertx.core.json.JsonObject)3 HashMap (java.util.HashMap)3 Test (org.junit.jupiter.api.Test)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 MapConverter (com.redhat.cloud.notifications.db.converters.MapConverter)1 WebhookProperties (com.redhat.cloud.notifications.models.WebhookProperties)1 Counter (io.micrometer.core.instrument.Counter)1 Response (io.restassured.response.Response)1 UUID (java.util.UUID)1