* Struct changes to satisfy go-gitea/gitea#3789 * Update user_app.go * update per feedback * copyright header
This commit is contained in:
parent
7d954d7754
commit
2858b80da5
1 changed files with 7 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||||
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a MIT-style
|
// Use of this source code is governed by a MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
@ -17,12 +18,14 @@ func BasicAuthEncode(user, pass string) string {
|
||||||
return base64.StdEncoding.EncodeToString([]byte(user + ":" + pass))
|
return base64.StdEncoding.EncodeToString([]byte(user + ":" + pass))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AccessToken represents a API access token.
|
// AccessToken represents an API access token.
|
||||||
// swagger:response AccessToken
|
// swagger:response AccessToken
|
||||||
type AccessToken struct {
|
type AccessToken struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Sha1 string `json:"sha1"`
|
Token string `json:"token"`
|
||||||
|
HashedToken string `json:"hashed_token"`
|
||||||
|
TokenLastEight string `json:"token_last_eight"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AccessTokenList represents a list of API access token.
|
// AccessTokenList represents a list of API access token.
|
||||||
|
|
Loading…
Reference in a new issue