Documentation ¶
Index ¶
- Variables
- func ChangeGUIDInIni(esn string)
- func CompareHashAndToken(hashedToken, token string) error
- func CreateJWT(ctx context.Context, skipGuid bool, isPrimary bool) *tokenpb.TokenBundle
- func CreateTokenAndHashedToken() (GUID string, GUIDHash string, isError error)
- func DecodeAndCompare(tokenHashes string, token string)
- func GenerateUUID() string
- func GetEsnFromTarget(target string) (string, error)
- func RemoveFromPrimaryStore(index int)
- func RemoveFromSecondStore(index int)
- func RemoveFromSessionStore(index int)
- func SetBotGUID(esn string, guid string, guidHash string) error
- func WriteTokenHash(esn string, tokenHash string) error
- type ClientToken
- type ClientTokenManager
- type RobotInfoStore
- type TokenServer
- func (s *TokenServer) AssociatePrimaryUser(ctx context.Context, req *tokenpb.AssociatePrimaryUserRequest) (*tokenpb.AssociatePrimaryUserResponse, error)
- func (s *TokenServer) AssociateSecondaryClient(ctx context.Context, req *tokenpb.AssociateSecondaryClientRequest) (*tokenpb.AssociateSecondaryClientResponse, error)
- func (s *TokenServer) RefreshToken(ctx context.Context, req *tokenpb.RefreshTokenRequest) (*tokenpb.RefreshTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimeFormat = time.RFC3339Nano ExpirationTime = time.Hour * 24 UserId = "wirepod" GlobalGUID = "tni1TRsTRTaNSapjo0Y+Sw==" )
View Source
var SecondaryTokenStore [][4]string
array of {"esn", "target", "guid", "guidhash"} for secondary user auth
View Source
var SessionWriteStoreCerts [][]byte
View Source
var SessionWriteStoreNames [][2]string
{"target", "name"}
View Source
var TokenHashStore [][3]string
array of {"target", "guid", "guidhash"} for primary user auth
Functions ¶
func ChangeGUIDInIni ¶
func ChangeGUIDInIni(esn string)
func CompareHashAndToken ¶
copied from vector-cloud
func DecodeAndCompare ¶
func GenerateUUID ¶
func GenerateUUID() string
func GetEsnFromTarget ¶
func RemoveFromPrimaryStore ¶
func RemoveFromPrimaryStore(index int)
func RemoveFromSecondStore ¶
func RemoveFromSecondStore(index int)
func RemoveFromSessionStore ¶
func RemoveFromSessionStore(index int)
func WriteTokenHash ¶
Types ¶
type ClientToken ¶
type ClientTokenManager ¶
type ClientTokenManager struct {
ClientTokens []ClientToken `json:"client_tokens"`
}
type RobotInfoStore ¶
type TokenServer ¶
type TokenServer struct {
tokenpb.UnimplementedTokenServer
}
func NewTokenServer ¶
func NewTokenServer() *TokenServer
func (*TokenServer) AssociatePrimaryUser ¶
func (s *TokenServer) AssociatePrimaryUser(ctx context.Context, req *tokenpb.AssociatePrimaryUserRequest) (*tokenpb.AssociatePrimaryUserResponse, error)
func (*TokenServer) AssociateSecondaryClient ¶
func (s *TokenServer) AssociateSecondaryClient(ctx context.Context, req *tokenpb.AssociateSecondaryClientRequest) (*tokenpb.AssociateSecondaryClientResponse, error)
func (*TokenServer) RefreshToken ¶
func (s *TokenServer) RefreshToken(ctx context.Context, req *tokenpb.RefreshTokenRequest) (*tokenpb.RefreshTokenResponse, error)
Click to show internal directories.
Click to hide internal directories.