Here are the examples of the java api class taken from open source projects.

1. OAuthAuthenticator#getAuthenticateUrl()

Project: che
Source File:
View license
     * Create authentication URL.
     * @param requestUrl
     *         URL of current HTTP request. This parameter required to be able determine URL for redirection after
     *         authentication. If URL contains query parameters they will be copy to 'state' parameter and returned to
     *         callback method.
     * @param scopes
     *         specify exactly what type of access needed
     * @return URL for authentication
public String getAuthenticateUrl(URL requestUrl, List<String> scopes) throws OAuthAuthenticationException {
    if (!isConfigured()) {
        throw new OAuthAuthenticationException("Authenticator is not configured");
    AuthorizationCodeRequestUrl url = flow.newAuthorizationUrl().setRedirectUri(findRedirectUrl(requestUrl)).setScopes(scopes);