@@ -527,12 +527,12 @@ public void testInvalidateRefreshToken() throws Exception {
527527 when (securityMainIndex .indexExists ()).thenReturn (true );
528528 TokenService tokenService = createTokenService (tokenServiceEnabledSettings , systemUTC ());
529529 Authentication authentication = new Authentication (new User ("joe" , "admin" ), new RealmRef ("native_realm" , "native" , "node1" ), null );
530- PlainActionFuture <Tuple < String , String > > tokenFuture = new PlainActionFuture <>();
530+ PlainActionFuture <TokenService . CreateTokenResult > tokenFuture = new PlainActionFuture <>();
531531 final String userTokenId = UUIDs .randomBase64UUID ();
532532 final String rawRefreshToken = UUIDs .randomBase64UUID ();
533533 tokenService .createOAuth2Tokens (userTokenId , rawRefreshToken , authentication , authentication , Collections .emptyMap (), tokenFuture );
534- final String accessToken = tokenFuture .get ().v1 ();
535- final String clientRefreshToken = tokenFuture .get ().v2 ();
534+ final String accessToken = tokenFuture .get ().getAccessToken ();
535+ final String clientRefreshToken = tokenFuture .get ().getRefreshToken ();
536536 assertNotNull (accessToken );
537537 mockFindTokenFromRefreshToken (rawRefreshToken , buildUserToken (tokenService , userTokenId , authentication ), null );
538538
@@ -553,12 +553,12 @@ public void testInvalidateRefreshTokenThatIsAlreadyInvalidated() throws Exceptio
553553 when (securityMainIndex .indexExists ()).thenReturn (true );
554554 TokenService tokenService = createTokenService (tokenServiceEnabledSettings , systemUTC ());
555555 Authentication authentication = new Authentication (new User ("joe" , "admin" ), new RealmRef ("native_realm" , "native" , "node1" ), null );
556- PlainActionFuture <Tuple < String , String > > tokenFuture = new PlainActionFuture <>();
556+ PlainActionFuture <TokenService . CreateTokenResult > tokenFuture = new PlainActionFuture <>();
557557 final String userTokenId = UUIDs .randomBase64UUID ();
558558 final String rawRefreshToken = UUIDs .randomBase64UUID ();
559559 tokenService .createOAuth2Tokens (userTokenId , rawRefreshToken , authentication , authentication , Collections .emptyMap (), tokenFuture );
560- final String accessToken = tokenFuture .get ().v1 ();
561- final String clientRefreshToken = tokenFuture .get ().v2 ();
560+ final String accessToken = tokenFuture .get ().getAccessToken ();
561+ final String clientRefreshToken = tokenFuture .get ().getRefreshToken ();
562562 assertNotNull (accessToken );
563563 mockFindTokenFromRefreshToken (rawRefreshToken , buildUserToken (tokenService , userTokenId , authentication ),
564564 new RefreshTokenStatus (true , randomAlphaOfLength (12 ), randomAlphaOfLength (6 ), false , null , null , null , null )
0 commit comments