public String generateAuthenticationUrl ( ResponseMode responseMode , String state ) { return String . format ( "%s/%s/oauth2/authorize?client_id=%s&response_type=code&redirect_uri=%s&response_mode=%s&state=%s" , environment ( ) . activeDirectoryEndpoint ( ) , domain ( ) , clientId ( ) , this . redirectUrl , responseMode . value , state ) ; }
Generate the URL to authenticate through OAuth2 .