From 2858b80da5f75fa2eea3fcf3205a5e6fd16da0ec Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Fri, 19 Apr 2019 02:53:46 -0400 Subject: [PATCH] Struct changes to satisfy #3789 (#160) * Struct changes to satisfy go-gitea/gitea#3789 * Update user_app.go * update per feedback * copyright header --- gitea/user_app.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gitea/user_app.go b/gitea/user_app.go index d3bfce9..023837f 100644 --- a/gitea/user_app.go +++ b/gitea/user_app.go @@ -1,4 +1,5 @@ // 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 // 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)) } -// AccessToken represents a API access token. +// AccessToken represents an API access token. // swagger:response AccessToken type AccessToken struct { - ID int64 `json:"id"` - Name string `json:"name"` - Sha1 string `json:"sha1"` + ID int64 `json:"id"` + Name string `json:"name"` + Token string `json:"token"` + HashedToken string `json:"hashed_token"` + TokenLastEight string `json:"token_last_eight"` } // AccessTokenList represents a list of API access token.