Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractCityFromID ¶
ExtractCityFromID is backwards compatible version of ExtractHobFromID
func ExtractHobFromID ¶
ExtractHobFromID takes an ID of the form LON1234 and returns LON
func HobRoleAuthoriser ¶
func HobRoleAuthoriser(roles []string, hobDiscriminator HobDiscriminator) server.Authoriser
HobRoleAuthoriser requires a service or user calling an endpoint to have ANY of the roles passed, which will be scoped to a particular HOB (as determined by hobDiscriminator). Following the convention of a HOB being the last portion of a role, the matched role(s) will be of the form "{{ role }}.{{ HOB }}" (or just "{{ role }}" if the hobDiscriminator returns "").
func SignInHobRoleAuthoriser ¶
func SignInHobRoleAuthoriser(roles []string, hobDiscriminator HobDiscriminator) server.Authoriser
SignInHobRoleAuthoriser requires a real person signed in calling an endpoint to have ANY of the passed roles, which will be scoped to a particular HOB (as determined by hobDiscriminator). Following the convention of a HOB being the last portion of a role, the matched role(s) will be of the form "{{ role }}.{{ HOB }}" (or just "{{ role }}" if the hobDiscriminator returns "").
Types ¶
type HobDiscriminator ¶
HobDiscriminator defines a function that can determine a HOB for a given server request. If no HOB can be determined, an empty string should be returned.