mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-25 07:50:52 +01:00
create a more flexible interface for the creation of access tokens
Provide a AccessTokenBuilderFactory to simplify the creation of access tokens and a default implementation which is based on JWT. Added also an AccessTokenCookieIssuer to unify the creation of access token cookies. Removed old BearerTokenGenerator.
This commit is contained in:
@@ -51,6 +51,7 @@ import static org.mockito.Mockito.*;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import sonia.scm.util.HttpUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -69,7 +70,7 @@ public class CookieBearerWebTokenGeneratorTest
|
||||
{
|
||||
Cookie c = mock(Cookie.class);
|
||||
|
||||
when(c.getName()).thenReturn(CookieBearerWebTokenGenerator.COOKIE_NAME);
|
||||
when(c.getName()).thenReturn(HttpUtil.COOKIE_BEARER_AUTHENTICATION);
|
||||
when(c.getValue()).thenReturn("value");
|
||||
when(request.getCookies()).thenReturn(new Cookie[] { c });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user