From 9feddee953d8d7fcd34f3a4fa760122c98c6543a Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Thu, 27 Jul 2017 11:56:32 -0400 Subject: [PATCH] Adding logical/identity.go to OSS (#3054) --- logical/identity.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 logical/identity.go diff --git a/logical/identity.go b/logical/identity.go new file mode 100644 index 0000000000..fbc4fbb79e --- /dev/null +++ b/logical/identity.go @@ -0,0 +1,26 @@ +package logical + +// Persona represents the information used by core to create implicit entity. +// Implicit entities get created when a client authenticates successfully from +// any of the authentication backends (except token backend). +// +// This is applicable to enterprise binaries only. Persona should be set in the +// Auth response returned by the credential backends. This structure is placed +// in the open source repository only to enable custom authetication plugins to +// be used along with enterprise binary. The custom auth plugins should make +// use of this and fill out the Persona information in the authentication +// response. +type Persona struct { + // MountType is the backend mount's type to which this identity belongs + // to. + MountType string `json:"mount_type" structs:"mount_type" mapstructure:"mount_type"` + + // MountAccessor is the identifier of the mount entry to which + // this identity + // belongs to. + MountAccessor string `json:"mount_accessor" structs:"mount_accessor" mapstructure:"mount_accessor"` + + // Name is the identifier of this identity in its + // authentication source. + Name string `json:"name" structs:"name" mapstructure:"name"` +}