- public CmsSessionImpl(Subject initialSubject, Authorization authorization, String localSessionId) {
- this.initialSubject = initialSubject;
- this.localSessionId = localSessionId;
- this.authorization = authorization;
- try {
- this.userDn = new LdapName(authorization.getName());
- } catch (InvalidNameException e) {
- throw new CmsException("Invalid user name " + authorization.getName(), e);
- }
- this.uuid = UUID.randomUUID();
- // register as service
- Hashtable<String, String> props = new Hashtable<>();
- props.put(CmsSession.USER_DN, authorization.getName());
- props.put(CmsSession.SESSION_UUID, uuid.toString());
- props.put(CmsSession.SESSION_LOCAL_ID, localSessionId);
- serviceRegistration = bc.registerService(CmsSession.class, this, props);
- }