mirror of
https://github.com/fhmq/hmq.git
synced 2026-09-01 23:34:52 +00:00
Plugins support (#46)
* modify * update * add acl * add feature * update dockerfile * add deploy * update * update * plugins * plugins * update * update * update * fixed * remove * fixed * add log * update * fixed * update * fix config * add http api * add http api * resp * add config for work chan * update * fixed * update * disable trace * fixed * change acl * fixed * fixed res * dd * dd * ddd * dd * update * fixed * update * add * fixed * update key * add log * update * format * update * update auth * update * update readme * added * update * fixed * fixed * fix * upade * update * update
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
package pac
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/jcmturner/rpc.v1/mstypes"
|
||||
"gopkg.in/jcmturner/rpc.v1/ndr"
|
||||
)
|
||||
|
||||
// Claims reference: https://msdn.microsoft.com/en-us/library/hh553895.aspx
|
||||
|
||||
// ClientClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh536365.aspx
|
||||
type ClientClaimsInfo struct {
|
||||
ClaimsSetMetadata mstypes.ClaimsSetMetadata
|
||||
ClaimsSet mstypes.ClaimsSet
|
||||
}
|
||||
|
||||
// Unmarshal bytes into the ClientClaimsInfo struct
|
||||
func (k *ClientClaimsInfo) Unmarshal(b []byte) (err error) {
|
||||
dec := ndr.NewDecoder(bytes.NewReader(b))
|
||||
m := new(mstypes.ClaimsSetMetadata)
|
||||
err = dec.Decode(m)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSetMetadata: %v", err)
|
||||
}
|
||||
k.ClaimsSetMetadata = *m
|
||||
k.ClaimsSet, err = k.ClaimsSetMetadata.ClaimsSet()
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSet: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user