mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-24 13:48:49 +08:00
14 lines
379 B
Go
14 lines
379 B
Go
![]() |
// Copyright (c) Mainflux
|
||
|
// SPDX-License-Identifier: Apache-2.0
|
||
|
|
||
|
package auth
|
||
|
|
||
|
// Tokenizer specifies API for encoding and decoding between string and Key.
|
||
|
type Tokenizer interface {
|
||
|
// Issue converts API Key to its string representation.
|
||
|
Issue(key Key) (token string, err error)
|
||
|
|
||
|
// Parse extracts API Key data from string token.
|
||
|
Parse(token string) (key Key, err error)
|
||
|
}
|