implement ui client session id

This changeset introduces a client side session id, which is generated
once by the client (ui: apiClient) and is send with each request to server.
The server makes the session id available by the PrincipalCollection of the
subject.
This commit is contained in:
Sebastian Sdorra
2019-11-13 14:03:48 +01:00
parent f0f134daeb
commit 42ab81cf50
16 changed files with 367 additions and 166 deletions

View File

@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* Creates a {@link BearerToken} from an authorization header with
* bearer authorization.
*
*
* @author Sebastian Sdorra
* @since 2.0.0
*/
@@ -53,7 +53,7 @@ public class BearerWebTokenGenerator extends SchemeBasedWebTokenGenerator
{
/**
* Creates a {@link BearerToken} from an authorization header
* Creates a {@link BearerToken} from an authorization header
* with bearer authorization.
*
* @param request http servlet request
@@ -70,7 +70,8 @@ public class BearerWebTokenGenerator extends SchemeBasedWebTokenGenerator
if (HttpUtil.AUTHORIZATION_SCHEME_BEARER.equalsIgnoreCase(scheme))
{
token = BearerToken.valueOf(authorization);
String sessionId = request.getHeader(HttpUtil.HEADER_SCM_SESSION);
token = BearerToken.create(sessionId, authorization);
}
return token;