1 package com.atlassian.sal.api.auth;
2
3 import java.net.URI;
4
5 /**
6 * Provides the {@code URI} to redirect users to for them to login before they can
7 * authorize consumer requests to access their data.
8 *
9 * @since 2.0
10 */
11 public interface LoginUriProvider
12 {
13 /**
14 * Returns the {@code URI} to redirect users for login. It must append the {@code returnUri}
15 * so that once login is complete, the user will be redirected back to the original page.
16 *
17 * @param returnUri {@code URI} of the page the application should redirect the user to after login is complete
18 * @return the {@code URI} to redirect users for login
19 * @throws RuntimeException if the returnUri is not a valid URI, or cannot be url encoded properly
20 */
21 URI getLoginUri(URI returnUri);
22 }