2022-01-15 22:54:49 +00:00
|
|
|
package databag
|
|
|
|
|
|
|
|
import (
|
2022-07-22 19:28:14 +00:00
|
|
|
"net/http"
|
2022-01-15 22:54:49 +00:00
|
|
|
)
|
|
|
|
|
2022-07-25 19:48:57 +00:00
|
|
|
//GetAccountToken retrieve type of account token
|
2022-01-15 22:54:49 +00:00
|
|
|
func GetAccountToken(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
2022-07-22 19:28:14 +00:00
|
|
|
accountToken, err := BearerAccountToken(r)
|
|
|
|
if err != nil {
|
|
|
|
LogMsg("token not found")
|
|
|
|
w.WriteHeader(http.StatusNotFound)
|
|
|
|
return
|
|
|
|
}
|
2022-01-15 22:54:49 +00:00
|
|
|
|
2022-07-22 19:28:14 +00:00
|
|
|
WriteResponse(w, accountToken.TokenType)
|
2022-01-15 22:54:49 +00:00
|
|
|
}
|