Documentation ¶
Index ¶
- Variables
- func ConvertToAppUser(request *goa.RequestData, user *account.User, identity *account.Identity) *app.User
- func ConvertUserSimple(request *goa.RequestData, identityID interface{}) *app.GenericData
- func ConvertUsersSimple(request *goa.RequestData, identityIDs []interface{}) []*app.GenericData
- func GenerateUserToken(ctx context.Context, tokenEndpoint string, configuration loginConfiguration, ...) (*app.AuthToken, error)
- func LoadKeyCloakIdentities(appl application.Application, users []account.User) ([]account.User, []account.Identity, error)
- type CollaboratorsController
- func (c *CollaboratorsController) Add(ctx *app.AddCollaboratorsContext) error
- func (c *CollaboratorsController) AddMany(ctx *app.AddManyCollaboratorsContext) error
- func (c *CollaboratorsController) List(ctx *app.ListCollaboratorsContext) error
- func (c *CollaboratorsController) Remove(ctx *app.RemoveCollaboratorsContext) error
- func (c *CollaboratorsController) RemoveMany(ctx *app.RemoveManyCollaboratorsContext) error
- type LoginController
- func (c *LoginController) Authorize(ctx *app.AuthorizeLoginContext) error
- func (c *LoginController) Generate(ctx *app.GenerateLoginContext) error
- func (c *LoginController) Link(ctx *app.LinkLoginContext) error
- func (c *LoginController) Linkcallback(ctx *app.LinkcallbackLoginContext) error
- func (c *LoginController) Linksession(ctx *app.LinksessionLoginContext) error
- func (c *LoginController) Refresh(ctx *app.RefreshLoginContext) error
- type LogoutController
- type SearchController
- type SpaceConfiguration
- type SpaceController
- type StatusController
- type UserController
- type UserControllerConfiguration
- type UserServiceController
- type UsersController
- type UsersControllerConfiguration
Constants ¶
This section is empty.
Variables ¶
var ( // Commit current build commit set by build script Commit = "0" // BuildTime set by build script in ISO 8601 (UTC) format: YYYY-MM-DDThh:mm:ssTZD (see https://www.w3.org/TR/NOTE-datetime for details) BuildTime = "0" // StartTime in ISO 8601 (UTC) format StartTime = time.Now().UTC().Format("2006-01-02T15:04:05Z") )
Functions ¶
func ConvertToAppUser ¶
func ConvertToAppUser(request *goa.RequestData, user *account.User, identity *account.Identity) *app.User
ConvertToAppUser converts a complete Identity object into REST representation
func ConvertUserSimple ¶
func ConvertUserSimple(request *goa.RequestData, identityID interface{}) *app.GenericData
ConvertUserSimple converts a simple Identity ID into a Generic Reletionship
func ConvertUsersSimple ¶
func ConvertUsersSimple(request *goa.RequestData, identityIDs []interface{}) []*app.GenericData
ConvertUsersSimple converts a array of simple Identity IDs into a Generic Reletionship List
func GenerateUserToken ¶
func GenerateUserToken(ctx context.Context, tokenEndpoint string, configuration loginConfiguration, username string, userSecret string) (*app.AuthToken, error)
GenerateUserToken obtains the access token from Keycloak for the user
func LoadKeyCloakIdentities ¶
func LoadKeyCloakIdentities(appl application.Application, users []account.User) ([]account.User, []account.Identity, error)
LoadKeyCloakIdentities loads keycloak identities for the users and returns the valid users along with their KC identities (if a user is missing his/her KC identity, he/she is filtered out of the result array)
Types ¶
type CollaboratorsController ¶
type CollaboratorsController struct { *goa.Controller // contains filtered or unexported fields }
CollaboratorsController implements the collaborators resource.
func NewCollaboratorsController ¶
func NewCollaboratorsController(service *goa.Service, db application.DB, config collaboratorsConfiguration, policyManager auth.AuthzPolicyManager) *CollaboratorsController
NewCollaboratorsController creates a collaborators controller.
func (*CollaboratorsController) Add ¶
func (c *CollaboratorsController) Add(ctx *app.AddCollaboratorsContext) error
Add user's identity to the list of space collaborators.
func (*CollaboratorsController) AddMany ¶
func (c *CollaboratorsController) AddMany(ctx *app.AddManyCollaboratorsContext) error
AddMany adds user's identities to the list of space collaborators.
func (*CollaboratorsController) List ¶
func (c *CollaboratorsController) List(ctx *app.ListCollaboratorsContext) error
List collaborators for the given space ID.
func (*CollaboratorsController) Remove ¶
func (c *CollaboratorsController) Remove(ctx *app.RemoveCollaboratorsContext) error
Remove user from the list of space collaborators.
func (*CollaboratorsController) RemoveMany ¶
func (c *CollaboratorsController) RemoveMany(ctx *app.RemoveManyCollaboratorsContext) error
RemoveMany removes users from the list of space collaborators.
type LoginController ¶
type LoginController struct { *goa.Controller // contains filtered or unexported fields }
LoginController implements the login resource.
func NewLoginController ¶
func NewLoginController(service *goa.Service, auth *login.KeycloakOAuthProvider, tokenManager token.Manager, configuration loginConfiguration) *LoginController
NewLoginController creates a login controller.
func (*LoginController) Authorize ¶
func (c *LoginController) Authorize(ctx *app.AuthorizeLoginContext) error
Authorize runs the authorize action.
func (*LoginController) Generate ¶
func (c *LoginController) Generate(ctx *app.GenerateLoginContext) error
Generate obtain the access token from Keycloak for the test user
func (*LoginController) Link ¶
func (c *LoginController) Link(ctx *app.LinkLoginContext) error
Link links identity provider(s) to the user's account
func (*LoginController) Linkcallback ¶
func (c *LoginController) Linkcallback(ctx *app.LinkcallbackLoginContext) error
Linkcallback redirects to original referel when Identity Provider account are linked to the user account
func (*LoginController) Linksession ¶
func (c *LoginController) Linksession(ctx *app.LinksessionLoginContext) error
Linksession links identity provider(s) to the user's account
func (*LoginController) Refresh ¶
func (c *LoginController) Refresh(ctx *app.RefreshLoginContext) error
Refresh obtain a new access token using the refresh token.
type LogoutController ¶
type LogoutController struct { *goa.Controller // contains filtered or unexported fields }
LogoutController implements the logout resource.
func NewLogoutController ¶
func NewLogoutController(service *goa.Service, logoutService *login.KeycloakLogoutService, configuration logoutConfiguration) *LogoutController
NewLogoutController creates a logout controller.
func (*LogoutController) Logout ¶
func (c *LogoutController) Logout(ctx *app.LogoutLogoutContext) error
Logout runs the logout action.
type SearchController ¶
type SearchController struct { *goa.Controller // contains filtered or unexported fields }
SearchController implements the search resource.
func NewSearchController ¶
func NewSearchController(service *goa.Service, db application.DB, configuration searchConfiguration) *SearchController
NewSearchController creates a search controller.
func (*SearchController) Users ¶
func (c *SearchController) Users(ctx *app.UsersSearchContext) error
Users runs the user search action.
type SpaceConfiguration ¶
type SpaceConfiguration interface { GetKeycloakEndpointAuthzResourceset(*goa.RequestData) (string, error) GetKeycloakEndpointToken(*goa.RequestData) (string, error) GetKeycloakEndpointClients(*goa.RequestData) (string, error) GetKeycloakEndpointAdmin(*goa.RequestData) (string, error) GetKeycloakClientID() string GetKeycloakSecret() string }
SpaceConfiguration represents space configuratoin
type SpaceController ¶
type SpaceController struct { *goa.Controller // contains filtered or unexported fields }
SpaceController implements the space resource.
func NewSpaceController ¶
func NewSpaceController(service *goa.Service, db application.DB, config SpaceConfiguration, resourceManager auth.AuthzResourceManager) *SpaceController
NewSpaceController creates a space controller.
func (*SpaceController) Create ¶
func (c *SpaceController) Create(ctx *app.CreateSpaceContext) error
Create runs the create action.
func (*SpaceController) Delete ¶
func (c *SpaceController) Delete(ctx *app.DeleteSpaceContext) error
Delete runs the delete action.
type StatusController ¶
type StatusController struct { *goa.Controller // contains filtered or unexported fields }
StatusController implements the status resource.
func NewStatusController ¶
func NewStatusController(service *goa.Service, db *gorm.DB) *StatusController
NewStatusController creates a status controller.
func (*StatusController) Show ¶
func (c *StatusController) Show(ctx *app.ShowStatusContext) error
Show runs the show action.
type UserController ¶
type UserController struct { *goa.Controller InitTenant func(context.Context) error // contains filtered or unexported fields }
UserController implements the user resource.
func NewUserController ¶
func NewUserController(service *goa.Service, db application.DB, tokenManager token.Manager, config UserControllerConfiguration) *UserController
NewUserController creates a user controller.
func (*UserController) Show ¶
func (c *UserController) Show(ctx *app.ShowUserContext) error
Show returns the authorized user based on the provided Token
type UserControllerConfiguration ¶
type UserControllerConfiguration interface {
GetCacheControlUser() string
}
UserControllerConfiguration the configuration for the UserController
type UserServiceController ¶
type UserServiceController struct { *goa.Controller UpdateTenant func(context.Context) error }
UserServiceController implements the UserService resource.
func NewUserServiceController ¶
func NewUserServiceController(service *goa.Service) *UserServiceController
NewUserServiceController creates a UserService controller.
func (*UserServiceController) Update ¶
func (c *UserServiceController) Update(ctx *app.UpdateUserServiceContext) error
Update runs the update action.
type UsersController ¶
type UsersController struct { *goa.Controller // contains filtered or unexported fields }
UsersController implements the users resource.
func NewUsersController ¶
func NewUsersController(service *goa.Service, db application.DB, config UsersControllerConfiguration, userProfileService login.UserProfileService) *UsersController
NewUsersController creates a users controller.
func (*UsersController) List ¶
func (c *UsersController) List(ctx *app.ListUsersContext) error
List runs the list action.
func (*UsersController) Show ¶
func (c *UsersController) Show(ctx *app.ShowUsersContext) error
Show runs the show action.
func (*UsersController) Update ¶
func (c *UsersController) Update(ctx *app.UpdateUsersContext) error
Update updates the authorized user based on the provided Token
type UsersControllerConfiguration ¶
type UsersControllerConfiguration interface { GetCacheControlUsers() string GetKeycloakAccountEndpoint(*goa.RequestData) (string, error) }
UsersControllerConfiguration the configuration for the UsersController