Documentation
¶
Overview ¶
Package bitwarden exposes an API compatible with the Bitwarden Open-Soure apps.
Index ¶
- func BulkDeleteCiphers(c echo.Context) error
- func BulkRestoreCiphers(c echo.Context) error
- func BulkSoftDeleteCiphers(c echo.Context) error
- func ChangeSecurityStamp(c echo.Context) error
- func ConfirmUser(c echo.Context) error
- func CreateCipher(c echo.Context) error
- func CreateFolder(c echo.Context) error
- func CreateOrganization(c echo.Context) error
- func CreateSharedCipher(c echo.Context) error
- func DeleteCipher(c echo.Context) error
- func DeleteFolder(c echo.Context) error
- func DeleteOrganization(c echo.Context) error
- func GetCipher(c echo.Context) error
- func GetCollections(c echo.Context) error
- func GetConfig(c echo.Context) error
- func GetCozy(c echo.Context) error
- func GetDomains(c echo.Context) error
- func GetFolder(c echo.Context) error
- func GetIcon(c echo.Context) error
- func GetOrganization(c echo.Context) error
- func GetProfile(c echo.Context) error
- func GetPublicKey(c echo.Context) error
- func GetRevisionDate(c echo.Context) error
- func GetToken(c echo.Context) error
- func ImportCiphers(c echo.Context) error
- func ListCiphers(c echo.Context) error
- func ListFolders(c echo.Context) error
- func ListOrganizationUser(c echo.Context) error
- func NegotiateHub(c echo.Context) error
- func Prelogin(c echo.Context) error
- func RefuseContact(c echo.Context) error
- func RenameFolder(c echo.Context) error
- func RestoreCipher(c echo.Context) error
- func Routes(router *echo.Group)
- func SendHint(c echo.Context) error
- func SetKeyPair(c echo.Context) error
- func ShareCipher(c echo.Context) error
- func SoftDeleteCipher(c echo.Context) error
- func Sync(c echo.Context) error
- func UpdateCipher(c echo.Context) error
- func UpdateDomains(c echo.Context) error
- func UpdateProfile(c echo.Context) error
- func WebsocketHub(c echo.Context) error
- type AccessTokenReponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BulkDeleteCiphers ¶
func BulkDeleteCiphers(c echo.Context) error
BulkDeleteCiphers is the handler for the route to delete ciphers in bulk.
func BulkRestoreCiphers ¶
func BulkRestoreCiphers(c echo.Context) error
BulkRestoreCiphers is the handler for the route to restore ciphers in bulk.
func BulkSoftDeleteCiphers ¶
func BulkSoftDeleteCiphers(c echo.Context) error
BulkSoftDeleteCiphers is the handler for the route to soft delete ciphers in bulk.
func ChangeSecurityStamp ¶
func ChangeSecurityStamp(c echo.Context) error
ChangeSecurityStamp is used by the client to change the security stamp, which will deconnect all the clients.
func ConfirmUser ¶
func ConfirmUser(c echo.Context) error
ConfirmUser is the route to confirm a user in an organization. It takes the organization key encrypted with the public key of this user as input.
func CreateCipher ¶
func CreateCipher(c echo.Context) error
CreateCipher is the handler for creating a cipher: login, secure note, etc.
func CreateFolder ¶
func CreateFolder(c echo.Context) error
CreateFolder is the route to add a folder via the Bitwarden API.
func CreateOrganization ¶
func CreateOrganization(c echo.Context) error
CreateOrganization is the route used to create an organization (with a collection).
func CreateSharedCipher ¶
func CreateSharedCipher(c echo.Context) error
CreateSharedCipher is the handler for creating a shared cipher.
func DeleteCipher ¶
func DeleteCipher(c echo.Context) error
DeleteCipher is the handler for the route to delete a cipher.
func DeleteFolder ¶
func DeleteFolder(c echo.Context) error
DeleteFolder is the handler for the route to delete a folder.
func DeleteOrganization ¶
func DeleteOrganization(c echo.Context) error
DeleteOrganization is the route for deleting an organization by its owner.
func GetCipher ¶
func GetCipher(c echo.Context) error
GetCipher returns information about a single cipher.
func GetCollections ¶
func GetCollections(c echo.Context) error
GetCollections is the route for getting information about the collections inside an organization.
func GetConfig ¶
func GetConfig(c echo.Context) error
GetConfig is the handler for GET /bitwarden/api/config.
func GetCozy ¶
func GetCozy(c echo.Context) error
GetCozy returns the information about the cozy organization, including the organization key.
func GetDomains ¶
func GetDomains(c echo.Context) error
GetDomains is the handler for listing the domains in settings.
func GetFolder ¶
func GetFolder(c echo.Context) error
GetFolder returns information about a single folder.
func GetIcon ¶
func GetIcon(c echo.Context) error
GetIcon returns an icon for the given domain, to be used by the bitwarden clients.
func GetOrganization ¶
func GetOrganization(c echo.Context) error
GetOrganization is the route for getting information about an organization.
func GetProfile ¶
func GetProfile(c echo.Context) error
GetProfile is the handler for the route to get profile information.
func GetPublicKey ¶
func GetPublicKey(c echo.Context) error
GetPublicKey returns the public key of a user.
func GetRevisionDate ¶
func GetRevisionDate(c echo.Context) error
GetRevisionDate returns the date of the last synchronization (as a number of milliseconds).
func GetToken ¶
func GetToken(c echo.Context) error
GetToken is used by the clients to get an access token. There are two supported grant types: password and refresh_token. Password is used the first time to register the client, and gets the initial credentials, by sending a hash of the user password. Refresh token is used later to get a new access token by sending the refresh token.
func ImportCiphers ¶
func ImportCiphers(c echo.Context) error
ImportCiphers is used to import ciphers and folders in bulk.
func ListCiphers ¶
func ListCiphers(c echo.Context) error
ListCiphers is the route for listing the Bitwarden ciphers. No pagination yet.
func ListFolders ¶
func ListFolders(c echo.Context) error
ListFolders is the route for listing the Bitwarden folders. No pagination yet.
func ListOrganizationUser ¶
func ListOrganizationUser(c echo.Context) error
ListOrganizationUser is the route for listing users inside an organization.
func NegotiateHub ¶
func NegotiateHub(c echo.Context) error
NegotiateHub is the handler for negotiating between the server and the client which transport to use for bitwarden notifications. Currently, only websocket is supported.
func Prelogin ¶
func Prelogin(c echo.Context) error
Prelogin tells to the client how many KDF iterations it must apply when hashing the master password.
func RefuseContact ¶
func RefuseContact(c echo.Context) error
RefuseContact is the API handler for DELETE /bitwarden/contacts/:id. It is used for refusing to give access to a user to shared ciphers, and removes them from all the sharings.
func RenameFolder ¶
func RenameFolder(c echo.Context) error
RenameFolder is the route for changing the (encrypted) name of a folder.
func RestoreCipher ¶
func RestoreCipher(c echo.Context) error
RestoreCipher is the handler for the route to restore a soft-deleted cipher. See https://github.com/bitwarden/server/pull/684 for the bitwarden implementation
func SendHint ¶
func SendHint(c echo.Context) error
SendHint is the handler for sending the hint when the user has forgot their password.
func SetKeyPair ¶
func SetKeyPair(c echo.Context) error
SetKeyPair is the handler for setting the key pair: public and private keys.
func ShareCipher ¶
func ShareCipher(c echo.Context) error
ShareCipher is used to share a cipher with an organization.
func SoftDeleteCipher ¶
func SoftDeleteCipher(c echo.Context) error
SoftDeleteCipher is the handler for the route to soft delete a cipher. See https://github.com/bitwarden/server/pull/684 for the bitwarden implementation
func Sync ¶
func Sync(c echo.Context) error
Sync is the handler for the main endpoint of the bitwarden API. It is used by the client as a one-way sync: it fetches all objects from the server to update its local database.
func UpdateCipher ¶
func UpdateCipher(c echo.Context) error
UpdateCipher is the route for changing a cipher.
func UpdateDomains ¶
func UpdateDomains(c echo.Context) error
UpdateDomains is the handler for updating the domains in settings.
func UpdateProfile ¶
func UpdateProfile(c echo.Context) error
UpdateProfile is the handler for the route to update the profile. Currently, only the hint for the master password can be changed.
func WebsocketHub ¶
func WebsocketHub(c echo.Context) error
WebsocketHub is the websocket handler for the hub to send notifications in real-time for bitwarden stuff.
Types ¶
type AccessTokenReponse ¶
type AccessTokenReponse struct { ClientID string `json:"client_id,omitempty"` RegToken string `json:"registration_access_token,omitempty"` Type string `json:"token_type"` ExpiresIn int `json:"expires_in"` Access string `json:"access_token"` Refresh string `json:"refresh_token"` Key string `json:"Key"` PrivateKey interface{} `json:"PrivateKey"` Kdf int `json:"Kdf"` Iterations int `json:"KdfIterations"` }
AccessTokenReponse is the stuct used for serializing to JSON the response for an access token.