// GetByID according to the ID for the client information
GetByID according to the ID for the client information
// GetByID according to the ID for the client information
func (cs *RedisClientStore) GetByID(id string) (cli oauth2.ClientInfo, err error) {
	result := cs.cli.HGet(RedisKeyOauth2Client, id)
	if verr := result.Err(); verr != nil {
		if verr == redis.Nil {
			return
		}
		err = verr
		return
	}
	iv, err := result.Bytes()
	if err != nil {
		return
	}
	var cv ClientValue
	if verr := json.Unmarshal(iv, &cv); verr != nil {
		err = verr
		return
	}
	cli = &models.Client{ID: id, Secret: cv.Secret, Domain: cv.Domain, UserID: cv.UserID}
	return
}
func ( cs * RedisClientStore ) GetByID ( id string ) ( cli oauth2 . ClientInfo , err error ) { result := cs . cli . HGet ( RedisKeyOauth2Client , id ) if verr := result . Err ( ) ; verr != nil { if verr == redis . Nil { return } err = verr return } iv , err := result . Bytes ( ) if err != nil { return } var cv ClientValue if verr := json . Unmarshal ( iv , & cv ) ; verr != nil { err = verr return } cli = & models . Client { ID : id , Secret : cv . Secret , Domain : cv . Domain , UserID : cv . UserID } return }
GetByID according to the ID for the client information
GetByID according to the ID for the client information