ballerina.auth.userstore package

public struct CredentialsStore

Represents the credentials store. Any type of implementation, such as ldap, jdbc, file based, etc. should be struct-wise similar

  • < CredentialsStore > authenticate ( string username , string password ) ( boolean )

    Attempts to authenticate with username and password

    Parameter Name Data Type Description
    username string user name
    password string password

    Return Variable Data Type Description
    boolean boolean: true if authentication is a success, else false
  • < CredentialsStore > readGroupsOfUser ( string username ) ( string )

    Reads the group(s) for the user with the given username

    Parameter Name Data Type Description
    username string user name

    Return Variable Data Type Description
    string string: relevant group(s) for the user, null if not found

public struct FilebasedUserstore

Represents the file-based user store

  • < FilebasedUserstore > authenticate ( string user , string password ) ( boolean )

    Attempts to authenticate with username and password

    Parameter Name Data Type Description
    user string
    password string password

    Return Variable Data Type Description
    boolean boolean: true if authentication is a success, else false
  • < FilebasedUserstore > readGroupsOfUser ( string username ) ( string )

    Reads the groups for a user

    Parameter Name Data Type Description
    username string

    Return Variable Data Type Description
    string string: comma separeted groups list, as specified in the userstore file or null if not found