Skip to content

Commit

Permalink
Test fixed
Browse files Browse the repository at this point in the history
mocked server to expect Bearer token
  • Loading branch information
strehle committed Jun 12, 2024
1 parent d4db3af commit c401ddf
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import org.cloudfoundry.identity.uaa.util.TimeServiceImpl;
import org.cloudfoundry.identity.uaa.zone.IdentityZone;
import org.cloudfoundry.identity.uaa.zone.IdentityZoneHolder;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -137,7 +135,7 @@ public void getExternalAuthenticationDetails_doesNotThrowWhenIdTokenIsValid() {
mockGithubServer.expect(method(GET))
.andExpect(requestTo(USER_INFO_URL))
.andExpect(header(ACCEPT, APPLICATION_JSON_VALUE))
.andExpect(header(AUTHORIZATION, "token " + accessToken))
.andExpect(header(AUTHORIZATION, "Bearer " + accessToken))
.andRespond(withSuccess(userInfoResponse, APPLICATION_JSON));

ExternalOAuthCodeToken oauth2Authentication = new ExternalOAuthCodeToken(null, origin, "http://uaa.example.com/login/callback/github", idToken, "accesstoken", "signedrequest");
Expand Down

0 comments on commit c401ddf

Please sign in to comment.