class DefaultUserInformation implements UserInformation {

    public static DefaultUserInformation fromAuthorizationContext(final AuthorizationContext context) {
        checkNotNull(context, "context");

        @Nullable final String defaultSubject =
                context.getFirstAuthorizationSubject().map(AuthorizationSubject::getId).orElse(null);
        final List<String> subjects = context.getAuthorizationSubjects()
                .stream()
                .map(AuthorizationSubject::getId)
                .collect(Collectors.toList());
        return new DefaultUserInformation(defaultSubject, subjects);
    }

    private  DefaultUserInformation(@Nullable final String defaultSubject,
            final List<String> subjects);

}