Commits

Jacek Jaroczynski committed 0e38668

added /auth/session call to retrieve session info (useful for validating credentials)

Comments (0)

Files changed (4)

src/main/java/com/atlassian/jira/rest/client/MetadataRestClient.java

-/*
- * Copyright (C) 2010 Atlassian
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.atlassian.jira.rest.client;
-
-import com.atlassian.jira.rest.client.domain.IssueType;
-import com.atlassian.jira.rest.client.domain.IssuelinksType;
-import com.atlassian.jira.rest.client.domain.Priority;
-import com.atlassian.jira.rest.client.domain.Resolution;
-import com.atlassian.jira.rest.client.domain.ServerInfo;
-import com.atlassian.jira.rest.client.domain.Status;
-
-import java.net.URI;
-
-/**
- * Serves information about JIRA metadata like server information, issue types defined, stati, priorities and resolutions.
- * This data constitutes a data dictionary which then JIRA issues base on.
- *
- * @since v0.1
- */
-public interface MetadataRestClient {
-	/**
-	 * Retrieves from the server complete information about selected issue type
-	 * @param uri URI to issue type resource (one can get it e.g. from <code>self</code> attribute
-	 * of issueType field of an issue).
-	 * @param progressMonitor progress monitor
-	 * @return complete information about issue type resource
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 */
-	IssueType getIssueType(URI uri, ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves from the server complete list of available issue type
-	 * @param progressMonitor progress monitor
-	 * @return complete information about issue type resource
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 * @since client 1.0, server 5.0
-	 */
-	Iterable<IssueType> getIssueTypes(ProgressMonitor progressMonitor);
-
-    /**
-     * Retrieves from the server complete list of available issue types
-     * @param progressMonitor progress monitor
-     * @return list of available issue types for this JIRA instance
-	 * @throws RestClientException in case of problems (if linking is disabled on the server, connectivity, malformed messages, etc.)
-     * @since server 4.3, client 0.5
-     */
-    Iterable<IssuelinksType> getIssueLinkTypes(ProgressMonitor progressMonitor);
-
-    /**
-     * Retrieves from the server complete list of available statuses
-     * @param progressMonitor progress monitor
-     * @return complete information about status resource
-     * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-     * @since client 1.0, server 5.0
-     */
-    Iterable<Status> getStatuses(ProgressMonitor progressMonitor);
-
-    /**
-	 * Retrieves complete information about selected status
-	 * @param uri URI to this status resource (one can get it e.g. from <code>self</code> attribute
-	 * of <code>status</code> field of an issue)
-	 * @param progressMonitor progress monitor
-	 * @return complete information about the selected status
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 */
-	Status getStatus(URI uri, ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves from the server complete information about selected priority
-	 * @param uri URI for the priority resource
-	 * @param progressMonitor progress monitor
-	 * @return complete information about the selected priority
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 */
-	Priority getPriority(URI uri, ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves from the server complete list of available priorities
-	 * @param progressMonitor progress monitor
-	 * @return complete information about the selected priority
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 * @since client 1.0, server 5.0
-	 */
-	Iterable<Priority> getPriorities(ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves from the server complete information about selected resolution
-	 * @param uri URI for the resolution resource
-	 * @param progressMonitor progress monitor
-	 * @return complete information about the selected resolution
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 */
-	Resolution getResolution(URI uri, ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves from the server complete information about selected resolution
-	 * @param progressMonitor progress monitor
-	 * @return complete information about the selected resolution
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 * @since client 1.0, server 5.0
-	 */
-	Iterable<Resolution> getResolutions(ProgressMonitor progressMonitor);
-
-	/**
-	 * Retrieves information about this JIRA instance
-	 * @param progressMonitor progress monitor
-	 * @return information about this JIRA instance
-	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
-	 */
-	ServerInfo getServerInfo(ProgressMonitor progressMonitor);
-}
+/*
+ * Copyright (C) 2010 Atlassian
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.atlassian.jira.rest.client;
+
+import com.atlassian.jira.rest.client.domain.*;
+
+import java.net.URI;
+
+/**
+ * Serves information about JIRA metadata like server information, issue types defined, stati, priorities and resolutions.
+ * This data constitutes a data dictionary which then JIRA issues base on.
+ *
+ * @since v0.1
+ */
+public interface MetadataRestClient {
+	/**
+	 * Retrieves from the server complete information about selected issue type
+	 * @param uri URI to issue type resource (one can get it e.g. from <code>self</code> attribute
+	 * of issueType field of an issue).
+	 * @param progressMonitor progress monitor
+	 * @return complete information about issue type resource
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 */
+	IssueType getIssueType(URI uri, ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves from the server complete list of available issue type
+	 * @param progressMonitor progress monitor
+	 * @return complete information about issue type resource
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 * @since client 1.0, server 5.0
+	 */
+	Iterable<IssueType> getIssueTypes(ProgressMonitor progressMonitor);
+
+    /**
+     * Retrieves from the server complete list of available issue types
+     * @param progressMonitor progress monitor
+     * @return list of available issue types for this JIRA instance
+	 * @throws RestClientException in case of problems (if linking is disabled on the server, connectivity, malformed messages, etc.)
+     * @since server 4.3, client 0.5
+     */
+    Iterable<IssuelinksType> getIssueLinkTypes(ProgressMonitor progressMonitor);
+
+    /**
+     * Retrieves from the server complete list of available statuses
+     * @param progressMonitor progress monitor
+     * @return complete information about status resource
+     * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+     * @since client 1.0, server 5.0
+     */
+    Iterable<Status> getStatuses(ProgressMonitor progressMonitor);
+
+    /**
+	 * Retrieves complete information about selected status
+	 * @param uri URI to this status resource (one can get it e.g. from <code>self</code> attribute
+	 * of <code>status</code> field of an issue)
+	 * @param progressMonitor progress monitor
+	 * @return complete information about the selected status
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 */
+	Status getStatus(URI uri, ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves from the server complete information about selected priority
+	 * @param uri URI for the priority resource
+	 * @param progressMonitor progress monitor
+	 * @return complete information about the selected priority
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 */
+	Priority getPriority(URI uri, ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves from the server complete list of available priorities
+	 * @param progressMonitor progress monitor
+	 * @return complete information about the selected priority
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 * @since client 1.0, server 5.0
+	 */
+	Iterable<Priority> getPriorities(ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves from the server complete information about selected resolution
+	 * @param uri URI for the resolution resource
+	 * @param progressMonitor progress monitor
+	 * @return complete information about the selected resolution
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 */
+	Resolution getResolution(URI uri, ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves from the server complete information about selected resolution
+	 * @param progressMonitor progress monitor
+	 * @return complete information about the selected resolution
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 * @since client 1.0, server 5.0
+	 */
+	Iterable<Resolution> getResolutions(ProgressMonitor progressMonitor);
+
+	/**
+	 * Retrieves information about this JIRA instance
+	 * @param progressMonitor progress monitor
+	 * @return information about this JIRA instance
+	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+	 */
+	ServerInfo getServerInfo(ProgressMonitor progressMonitor);
+
+    /**
+     * Retrieves information about current user session
+     * @param progressMonitor progress monitor
+     * @return information about current user session
+     * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
+     */
+    SessionInfo getSessionInfo(ProgressMonitor progressMonitor);
+}

src/main/java/com/atlassian/jira/rest/client/domain/SessionInfo.java

+/*
+ * Copyright (C) 2010 Atlassian
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.atlassian.jira.rest.client.domain;
+
+/**
+ * Session information
+ *
+ * @since 1.1
+ */
+public class SessionInfo {
+    private String userName;
+
+    public SessionInfo(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+}

src/main/java/com/atlassian/jira/rest/client/internal/jersey/JerseyMetadataRestClient.java

-/*
- * Copyright (C) 2010 Atlassian
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.atlassian.jira.rest.client.internal.jersey;
-
-import com.atlassian.jira.rest.client.MetadataRestClient;
-import com.atlassian.jira.rest.client.ProgressMonitor;
-import com.atlassian.jira.rest.client.domain.IssueType;
-import com.atlassian.jira.rest.client.domain.IssuelinksType;
-import com.atlassian.jira.rest.client.domain.Priority;
-import com.atlassian.jira.rest.client.domain.Resolution;
-import com.atlassian.jira.rest.client.domain.ServerInfo;
-import com.atlassian.jira.rest.client.domain.Status;
-import com.atlassian.jira.rest.client.internal.json.GenericJsonArrayParser;
-import com.atlassian.jira.rest.client.internal.json.IssueLinkTypesJsonParser;
-import com.atlassian.jira.rest.client.internal.json.IssueTypeJsonParser;
-import com.atlassian.jira.rest.client.internal.json.PriorityJsonParser;
-import com.atlassian.jira.rest.client.internal.json.ResolutionJsonParser;
-import com.atlassian.jira.rest.client.internal.json.ServerInfoJsonParser;
-import com.atlassian.jira.rest.client.internal.json.StatusJsonParser;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.client.apache.ApacheHttpClient;
-import org.codehaus.jettison.json.JSONObject;
-
-import javax.ws.rs.core.UriBuilder;
-import java.net.URI;
-import java.util.concurrent.Callable;
-
-/**
- * Jersey-based implementation of MetadataRestClient
- *
- * @since v0.1
- */
-public class JerseyMetadataRestClient extends AbstractJerseyRestClient implements MetadataRestClient {
-	private final String SERVER_INFO_RESOURCE = "/serverInfo";
-	private final ServerInfoJsonParser serverInfoJsonParser = new ServerInfoJsonParser();
-	private final IssueTypeJsonParser issueTypeJsonParser = new IssueTypeJsonParser();
-	private final GenericJsonArrayParser<IssueType> issueTypesJsonParser = GenericJsonArrayParser.create(issueTypeJsonParser);
-	private final StatusJsonParser statusJsonParser = new StatusJsonParser();
-    private final GenericJsonArrayParser<Status> statusesJsonParser = GenericJsonArrayParser.create(statusJsonParser);
-    private final PriorityJsonParser priorityJsonParser = new PriorityJsonParser();
-	private final GenericJsonArrayParser<Priority> prioritiesJsonParser = GenericJsonArrayParser.create(priorityJsonParser);
-	private final ResolutionJsonParser resolutionJsonParser = new ResolutionJsonParser();
-	private final GenericJsonArrayParser<Resolution> resolutionsJsonParser = GenericJsonArrayParser.create(resolutionJsonParser);
-	private final IssueLinkTypesJsonParser issueLinkTypesJsonParser = new IssueLinkTypesJsonParser();
-
-	public JerseyMetadataRestClient(URI baseUri, ApacheHttpClient client) {
-		super(baseUri, client);
-	}
-
-	@Override
-	public IssueType getIssueType(final URI uri, ProgressMonitor progressMonitor) {
-		return getAndParse(uri, issueTypeJsonParser, progressMonitor);
-	}
-
-	@Override
-	public Iterable<IssueType> getIssueTypes(ProgressMonitor progressMonitor) {
-		final URI uri = UriBuilder.fromUri(baseUri).path("issuetype").build();
-		return getAndParse(uri, issueTypesJsonParser, progressMonitor);
-	}
-
-    @Override
-	public Iterable<IssuelinksType> getIssueLinkTypes(ProgressMonitor progressMonitor) {
-		final URI uri = UriBuilder.fromUri(baseUri).path("issueLinkType").build();
-		return getAndParse(uri, issueLinkTypesJsonParser, progressMonitor);
-	}
-
-    @Override
-    public Iterable<Status> getStatuses(ProgressMonitor progressMonitor) {
-        final URI uri = UriBuilder.fromUri(baseUri).path("status").build();
-        return getAndParse(uri, statusesJsonParser, progressMonitor);
-    }
-
-    @Override
-	public Status getStatus(final URI uri, ProgressMonitor progressMonitor) {
-		return getAndParse(uri, statusJsonParser, progressMonitor);
-	}
-
-	@Override
-	public Priority getPriority(final URI uri, ProgressMonitor progressMonitor) {
-		return getAndParse(uri, priorityJsonParser, progressMonitor);
-	}
-
-	@Override
-	public Iterable<Priority> getPriorities(ProgressMonitor progressMonitor) {
-		final URI uri = UriBuilder.fromUri(baseUri).path("priority").build();
-		return getAndParse(uri, prioritiesJsonParser, progressMonitor);
-	}
-
-	@Override
-	public Resolution getResolution(URI uri, ProgressMonitor progressMonitor) {
-		return getAndParse(uri, resolutionJsonParser, progressMonitor);
-	}
-
-	@Override
-	public Iterable<Resolution> getResolutions(ProgressMonitor progressMonitor) {
-		final URI uri = UriBuilder.fromUri(baseUri).path("resolution").build();
-		return getAndParse(uri, resolutionsJsonParser, progressMonitor);
-	}
-
-	@Override
-	public ServerInfo getServerInfo(ProgressMonitor progressMonitor) {
-		return invoke(new Callable<ServerInfo>() {
-			@Override
-			public ServerInfo call() throws Exception {
-				final WebResource serverInfoResource = client.resource(UriBuilder.fromUri(baseUri)
-						.path(SERVER_INFO_RESOURCE).build());
-				return serverInfoJsonParser.parse(serverInfoResource.get(JSONObject.class));
-			}
-		});
-	}
-}
+/*
+ * Copyright (C) 2010 Atlassian
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.atlassian.jira.rest.client.internal.jersey;
+
+import com.atlassian.jira.rest.client.MetadataRestClient;
+import com.atlassian.jira.rest.client.ProgressMonitor;
+import com.atlassian.jira.rest.client.domain.*;
+import com.atlassian.jira.rest.client.internal.json.*;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.client.apache.ApacheHttpClient;
+import org.codehaus.jettison.json.JSONObject;
+
+import javax.ws.rs.core.UriBuilder;
+import java.net.URI;
+import java.util.concurrent.Callable;
+
+/**
+ * Jersey-based implementation of MetadataRestClient
+ *
+ * @since v0.1
+ */
+public class JerseyMetadataRestClient extends AbstractJerseyRestClient implements MetadataRestClient {
+	private final String SERVER_INFO_RESOURCE = "/serverInfo";
+	private final ServerInfoJsonParser serverInfoJsonParser = new ServerInfoJsonParser();
+    private SessionInfoParser sessionInfoJsonParser = new SessionInfoParser();
+    private final IssueTypeJsonParser issueTypeJsonParser = new IssueTypeJsonParser();
+    private final GenericJsonArrayParser<IssueType> issueTypesJsonParser = GenericJsonArrayParser.create(issueTypeJsonParser);
+    private final StatusJsonParser statusJsonParser = new StatusJsonParser();
+    private final GenericJsonArrayParser<Status> statusesJsonParser = GenericJsonArrayParser.create(statusJsonParser);
+    private final PriorityJsonParser priorityJsonParser = new PriorityJsonParser();
+    private final GenericJsonArrayParser<Priority> prioritiesJsonParser = GenericJsonArrayParser.create(priorityJsonParser);
+    private final ResolutionJsonParser resolutionJsonParser = new ResolutionJsonParser();
+    private final GenericJsonArrayParser<Resolution> resolutionsJsonParser = GenericJsonArrayParser.create(resolutionJsonParser);
+    private final IssueLinkTypesJsonParser issueLinkTypesJsonParser = new IssueLinkTypesJsonParser();
+
+    public JerseyMetadataRestClient(URI baseUri, ApacheHttpClient client) {
+		super(baseUri, client);
+	}
+
+	@Override
+	public IssueType getIssueType(final URI uri, ProgressMonitor progressMonitor) {
+		return getAndParse(uri, issueTypeJsonParser, progressMonitor);
+	}
+
+	@Override
+	public Iterable<IssueType> getIssueTypes(ProgressMonitor progressMonitor) {
+		final URI uri = UriBuilder.fromUri(baseUri).path("issuetype").build();
+		return getAndParse(uri, issueTypesJsonParser, progressMonitor);
+	}
+
+    @Override
+	public Iterable<IssuelinksType> getIssueLinkTypes(ProgressMonitor progressMonitor) {
+		final URI uri = UriBuilder.fromUri(baseUri).path("issueLinkType").build();
+		return getAndParse(uri, issueLinkTypesJsonParser, progressMonitor);
+	}
+
+    @Override
+    public Iterable<Status> getStatuses(ProgressMonitor progressMonitor) {
+        final URI uri = UriBuilder.fromUri(baseUri).path("status").build();
+        return getAndParse(uri, statusesJsonParser, progressMonitor);
+    }
+
+    @Override
+	public Status getStatus(final URI uri, ProgressMonitor progressMonitor) {
+		return getAndParse(uri, statusJsonParser, progressMonitor);
+	}
+
+	@Override
+	public Priority getPriority(final URI uri, ProgressMonitor progressMonitor) {
+		return getAndParse(uri, priorityJsonParser, progressMonitor);
+	}
+
+	@Override
+	public Iterable<Priority> getPriorities(ProgressMonitor progressMonitor) {
+		final URI uri = UriBuilder.fromUri(baseUri).path("priority").build();
+		return getAndParse(uri, prioritiesJsonParser, progressMonitor);
+	}
+
+	@Override
+	public Resolution getResolution(URI uri, ProgressMonitor progressMonitor) {
+		return getAndParse(uri, resolutionJsonParser, progressMonitor);
+	}
+
+	@Override
+	public Iterable<Resolution> getResolutions(ProgressMonitor progressMonitor) {
+		final URI uri = UriBuilder.fromUri(baseUri).path("resolution").build();
+		return getAndParse(uri, resolutionsJsonParser, progressMonitor);
+	}
+
+	@Override
+	public ServerInfo getServerInfo(ProgressMonitor progressMonitor) {
+		return invoke(new Callable<ServerInfo>() {
+			@Override
+			public ServerInfo call() throws Exception {
+				final WebResource serverInfoResource = client.resource(UriBuilder.fromUri(baseUri)
+						.path(SERVER_INFO_RESOURCE).build());
+				return serverInfoJsonParser.parse(serverInfoResource.get(JSONObject.class));
+			}
+		});
+	}
+
+    @Override
+    public SessionInfo getSessionInfo(ProgressMonitor progressMonitor) {
+        return invoke(new Callable<SessionInfo>() {
+            @Override
+            public SessionInfo call() throws Exception {
+
+                URI sessionUri = UriBuilder.fromUri(baseUri.toString().replace("api", "auth")).path("/session").build();
+
+                final WebResource sessionInfoResource = client.resource(sessionUri);
+                return sessionInfoJsonParser.parse(sessionInfoResource.get(JSONObject.class));
+            }
+        });
+    }
+}

src/main/java/com/atlassian/jira/rest/client/internal/json/SessionInfoParser.java

+/*
+ * Copyright (C) 2010 Atlassian
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.atlassian.jira.rest.client.internal.json;
+
+import com.atlassian.jira.rest.client.domain.SessionInfo;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+
+public class SessionInfoParser implements JsonObjectParser<SessionInfo> {
+    @Override
+    public SessionInfo parse(JSONObject json) throws JSONException {
+
+        String userName = json.getString("name");
+
+        return new SessionInfo(userName);
+    }
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.