Skip to content

Commit b4e87ff

Browse files
Jiankai ZhengJiankai Zheng
authored andcommitted
refactor(authorization): refactor to more clear method name
1 parent 66ca27a commit b4e87ff

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/spotify/api/authorization/AuthorizationPKCERequestToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public AuthorizationPKCERequestToken() {
2525
* @param redirectUri the redirect uri supplied when requesting the authorization code
2626
* @return an object containing values like the access and refresh token
2727
*/
28-
public AuthorizationCodeFlowTokenResponse getAccessAndRefreshToken(String clientId, String code, String redirectUri, String codeVerifier) {
28+
public AuthorizationCodeFlowTokenResponse getAuthorizationCodeToken(String clientId, String code, String redirectUri, String codeVerifier) {
2929
logger.trace("Constructing HTTP call to fetch an access and refresh token.");
3030
final Call<AuthorizationCodeFlowTokenResponse> httpCall = authorizationCodeFlowService
3131
.getAccessAndRefreshTokenPKCE(

src/main/java/spotify/api/authorization/AuthorizationRequestToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public AuthorizationRequestToken() {
3535
* @param redirectUri the redirect uri supplied when requesting the authorization code
3636
* @return an object containing values like the access and refresh token
3737
*/
38-
public AuthorizationCodeFlowTokenResponse getAccessAndRefreshToken(String clientId, String clientSecret, String code, String redirectUri) {
38+
public AuthorizationCodeFlowTokenResponse getAuthorizationCodeToken(String clientId, String clientSecret, String code, String redirectUri) {
3939
logger.trace("Encoding client id and secret to base 64.");
4040
final String base64EncodedBasicAuth = Credentials.basic(clientId, clientSecret);
4141

src/main/java/spotify/api/authorization/ClientCredentialsFlow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ClientCredentialsFlow() {
4343
* @param clientSecret secret of the client
4444
* @return an object containing the access token
4545
*/
46-
public ClientCredentialsFlowTokenResponse getAccessToken(String clientId, String clientSecret) {
46+
public ClientCredentialsFlowTokenResponse getClientCredentialToken(String clientId, String clientSecret) {
4747
logger.trace("Encoding client id and secret to base 64.");
4848
final String base64EncodedBasicAuth = Credentials.basic(clientId, clientSecret);
4949

0 commit comments

Comments
 (0)