diff --git a/src/main/java/de/interaapps/accounts/apiclient/oauth2/OAuth2Client.java b/src/main/java/de/interaapps/accounts/apiclient/oauth2/OAuth2Client.java index a92a236..5622f64 100644 --- a/src/main/java/de/interaapps/accounts/apiclient/oauth2/OAuth2Client.java +++ b/src/main/java/de/interaapps/accounts/apiclient/oauth2/OAuth2Client.java @@ -61,7 +61,7 @@ public List getScopes() { } public static class AuthorizationURLBuilder { - private String redirectUrl; + private String redirectUri; private String state; private List scopes = new ArrayList<>(); @@ -79,7 +79,7 @@ public AuthorizationURLBuilder addScopes(String ...scope){ } public AuthorizationURLBuilder setRedirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; + this.redirectUri = redirectUrl; return this; } public AuthorizationURLBuilder setState(String state) { @@ -93,7 +93,7 @@ public String getState() { return state; } public String getRedirectUrl() { - return redirectUrl; + return redirectUri; } private String encodeUrl(String component){ @@ -110,7 +110,7 @@ public String build(){ +"/auth/oauth2" +"?client_id="+encodeUrl(clientId) +"&scope="+encodeUrl(String.join(" ", scopes)) - +(redirectUrl == null ? "" : "&redirect_url="+encodeUrl(redirectUrl)) + +(redirectUri == null ? "" : "&redirect_url="+encodeUrl(redirectUri)) +(state == null ? "" : "&state="+encodeUrl(state)); } }