How do you handle authentication in REST Assured?

Basic Authentication :
given()
    .auth().basic("username", "password")
.when()
    .get("/secure-endpoint");
?

Bearer Token :
given()
    .auth().oauth2("token")
.when()
    .get("/secure-endpoint");?