diff options
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v5/model/access.go')
-rw-r--r-- | vendor/github.com/mattermost/mattermost-server/v5/model/access.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v5/model/access.go b/vendor/github.com/mattermost/mattermost-server/v5/model/access.go index bbac3601..6b60ea9e 100644 --- a/vendor/github.com/mattermost/mattermost-server/v5/model/access.go +++ b/vendor/github.com/mattermost/mattermost-server/v5/model/access.go @@ -31,17 +31,18 @@ type AccessResponse struct { ExpiresIn int32 `json:"expires_in"` Scope string `json:"scope"` RefreshToken string `json:"refresh_token"` + IdToken string `json:"id_token"` } // IsValid validates the AccessData and returns an error if it isn't configured // correctly. func (ad *AccessData) IsValid() *AppError { - if len(ad.ClientId) == 0 || len(ad.ClientId) > 26 { + if ad.ClientId == "" || len(ad.ClientId) > 26 { return NewAppError("AccessData.IsValid", "model.access.is_valid.client_id.app_error", nil, "", http.StatusBadRequest) } - if len(ad.UserId) == 0 || len(ad.UserId) > 26 { + if ad.UserId == "" || len(ad.UserId) > 26 { return NewAppError("AccessData.IsValid", "model.access.is_valid.user_id.app_error", nil, "", http.StatusBadRequest) } @@ -53,7 +54,7 @@ func (ad *AccessData) IsValid() *AppError { return NewAppError("AccessData.IsValid", "model.access.is_valid.refresh_token.app_error", nil, "", http.StatusBadRequest) } - if len(ad.RedirectUri) == 0 || len(ad.RedirectUri) > 256 || !IsValidHttpUrl(ad.RedirectUri) { + if ad.RedirectUri == "" || len(ad.RedirectUri) > 256 || !IsValidHttpUrl(ad.RedirectUri) { return NewAppError("AccessData.IsValid", "model.access.is_valid.redirect_uri.app_error", nil, "", http.StatusBadRequest) } |