diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/authorize.go | 3 | ||||
-rw-r--r-- | model/oauth.go | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/model/authorize.go b/model/authorize.go index 9fd5afa70..22325b181 100644 --- a/model/authorize.go +++ b/model/authorize.go @@ -12,6 +12,7 @@ import ( const ( AUTHCODE_EXPIRE_TIME = 60 * 10 // 10 minutes AUTHCODE_RESPONSE_TYPE = "code" + IMPLICIT_RESPONSE_TYPE = "token" DEFAULT_SCOPE = "user" ) @@ -58,7 +59,7 @@ func (ad *AuthData) IsValid() *AppError { return NewAppError("AuthData.IsValid", "model.authorize.is_valid.create_at.app_error", nil, "client_id="+ad.ClientId, http.StatusBadRequest) } - if len(ad.RedirectUri) == 0 || len(ad.RedirectUri) > 256 || !IsValidHttpUrl(ad.RedirectUri) { + if len(ad.RedirectUri) > 256 || !IsValidHttpUrl(ad.RedirectUri) { return NewAppError("AuthData.IsValid", "model.authorize.is_valid.redirect_uri.app_error", nil, "client_id="+ad.ClientId, http.StatusBadRequest) } diff --git a/model/oauth.go b/model/oauth.go index 0ea1aa4e2..6f662a5ab 100644 --- a/model/oauth.go +++ b/model/oauth.go @@ -109,7 +109,6 @@ func (a *OAuthApp) PreUpdate() { a.UpdateAt = GetMillis() } -// ToJson convert a User to a json string func (a *OAuthApp) ToJson() string { b, _ := json.Marshal(a) return string(b) @@ -135,7 +134,6 @@ func (a *OAuthApp) IsValidRedirectURL(url string) bool { return false } -// OAuthAppFromJson will decode the input and return a User func OAuthAppFromJson(data io.Reader) *OAuthApp { var app *OAuthApp json.NewDecoder(data).Decode(&app) |