Skip to content

Commit

Permalink
🥚 集成 Slack 和 Line
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyd-c committed Mar 29, 2021
1 parent 2e64fb9 commit 6a479d9
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions src/main/java/me/zhyd/oauth/config/AuthDefaultSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -878,5 +878,69 @@ public String userInfo() {
public String refresh() {
return "https://api.amazon.com/auth/o2/token";
}
},
/**
* Slack
*
* @since 1.16.0
*/
SLACK {
@Override
public String authorize() {
return "https://slack.com/oauth/v2/authorize";
}

/**
* 该 API 获取到的是 access token
*
* https://slack.com/api/oauth.token 获取到的是 workspace token
*
* @return String
*/
@Override
public String accessToken() {
return "https://slack.com/api/oauth.v2.access";
}

@Override
public String userInfo() {
return "https://slack.com/api/users.info";
}

@Override
public String revoke() {
return "https://slack.com/api/auth.revoke";
}
},
/**
* line
*
* @since 1.16.0
*/
LINE {
@Override
public String authorize() {
return "https://access.line.me/oauth2/v2.1/authorize";
}

@Override
public String accessToken() {
return "https://api.line.me/oauth2/v2.1/token";
}

@Override
public String userInfo() {
return "https://api.line.me/v2/profile";
}

@Override
public String refresh() {
return "https://api.line.me/oauth2/v2.1/token";
}

@Override
public String revoke() {
return "https://api.line.me/oauth2/v2.1/revoke";
}
}
}

0 comments on commit 6a479d9

Please sign in to comment.