[#367] session: Support magic_number
field of RequestMetaHeader
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e9a8451fb7
commit
227a871a04
5 changed files with 47 additions and 1 deletions
|
@ -88,6 +88,8 @@ type RequestMetaHeader struct {
|
|||
bearerToken *acl.BearerToken
|
||||
|
||||
origin *RequestMetaHeader
|
||||
|
||||
netMagic uint64
|
||||
}
|
||||
|
||||
type ResponseVerificationHeader struct {
|
||||
|
@ -443,6 +445,22 @@ func (r *RequestMetaHeader) SetOrigin(v *RequestMetaHeader) {
|
|||
}
|
||||
}
|
||||
|
||||
// GetNetworkMagic returns NeoFS network magic.
|
||||
func (r *RequestMetaHeader) GetNetworkMagic() uint64 {
|
||||
if r != nil {
|
||||
return r.netMagic
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetNetworkMagic sets NeoFS network magic.
|
||||
func (r *RequestMetaHeader) SetNetworkMagic(v uint64) {
|
||||
if r != nil {
|
||||
r.netMagic = v
|
||||
}
|
||||
}
|
||||
|
||||
func (l *TokenLifetime) GetExp() uint64 {
|
||||
if l != nil {
|
||||
return l.exp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue