mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
feat: authorize via clientId and clientSecret
Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
@ -129,7 +129,7 @@ func CheckOAuthLogin(clientId string, responseType string, redirectUri string, s
|
||||
return "response_type should be \"code\"", nil
|
||||
}
|
||||
|
||||
application := getApplicationByClientId(clientId)
|
||||
application := GetApplicationByClientId(clientId)
|
||||
if application == nil {
|
||||
return "Invalid client_id", nil
|
||||
}
|
||||
@ -192,7 +192,7 @@ func GetOAuthCode(userId string, clientId string, responseType string, redirectU
|
||||
}
|
||||
|
||||
func GetOAuthToken(grantType string, clientId string, clientSecret string, code string) *TokenWrapper {
|
||||
application := getApplicationByClientId(clientId)
|
||||
application := GetApplicationByClientId(clientId)
|
||||
if application == nil {
|
||||
return &TokenWrapper{
|
||||
AccessToken: "error: invalid client_id",
|
||||
|
Reference in New Issue
Block a user