Documentation ¶
Overview ¶
Package sty_shared
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by <Replace with FULL_NAME> / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sty_shared
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by Scott Yacko / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sty-shared ¶
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by <Replace with FULL_NAME> / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetClientId(sessionPtr *AWSSession) string
- func GetId(sessionPtr *AWSSession, region, userPoolId string) (identityId string, errorInfo pi.ErrorInfo)
- func GetIdentityCredentials(sessionPtr *AWSSession, identityId string) (identityIdCredentials aws.Credentials, errorInfo pi.ErrorInfo)
- func GetParameters(sessionPtr *AWSSession, ssmParameters ...string) (parametersOutput awsSSM.GetParametersOutput, errorInfo pi.ErrorInfo)
- func Login(loginType, username string, password *string, sessionPtr *AWSSession) (errorInfo pi.ErrorInfo)
- func NewCognitoLogin(username, userPoolId, clientId string, password *string, clientSecret *string) (*cognitoLogin, pi.ErrorInfo)
- func ParseAWSJWT(sessionPtr *AWSSession, tokenType, token string) (claims jwt.Claims, tokenValuePtr *jwt.Token, errorInfo pi.ErrorInfo)
- func PullCognitoUserInfo(sessionPtr *AWSSession, username string) (userData map[string]interface{}, errorInfo pi.ErrorInfo)
- func SetClientId(clientId string, sessionPtr *AWSSession)
- type AWSSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientId ¶ added in v2024.6.17
func GetClientId(sessionPtr *AWSSession) string
GetClientId returns the client ID stored in the sessionPtr.
Customer Messages: None Errors: None Verifications: None
func GetId ¶ added in v2024.5.8
func GetId( sessionPtr *AWSSession, region, userPoolId string, ) ( identityId string, errorInfo pi.ErrorInfo, )
GetId - will return AWS Identity Id needed to get temporary credentials The variables 'region' and 'userPoolId' are option and are only used when sessionPtr values are empty. The variable 'identityId' is only needed if sessionPtr is nil.
Customer Messages: None Errors: None Verifications: None
func GetIdentityCredentials ¶ added in v2024.5.8
func GetIdentityCredentials( sessionPtr *AWSSession, identityId string, ) ( identityIdCredentials aws.Credentials, errorInfo pi.ErrorInfo, )
GetIdentityCredentials - will return AWS temporary credentials. The variables 'identityId' is option and are only used when sessionPtr values are empty. The variable 'identityIdCredentials' is only needed if sessionPtr is nil.
Customer Messages: None Errors: None Verifications: None
func GetParameters ¶ added in v2024.5.4
func GetParameters( sessionPtr *AWSSession, ssmParameters ...string, ) ( parametersOutput awsSSM.GetParametersOutput, errorInfo pi.ErrorInfo, )
GetParameters - will return System Manager parameters. WithDecryption is assumed.
Customer Messages: None Errors: None Verifications: None
func Login ¶ added in v2024.5.0
func Login( loginType, username string, password *string, sessionPtr *AWSSession, ) ( errorInfo pi.ErrorInfo, )
Login - authenticates the user with the provided login type, username, and password. It stores the tokens in the sessionPtr, along with the username and the clientId.
Customer Messages: None Errors: None Verifications: None
func NewCognitoLogin ¶ added in v2024.5.0
func NewCognitoLogin( username, userPoolId, clientId string, password *string, clientSecret *string, ) ( *cognitoLogin, pi.ErrorInfo, )
NewCognitoLogin - creates a CognitoLogin object. If you have a clientSecret, we use a pointer so there is only one place in memory (Security).
Customer Messages: None Errors: None Verifications: None
func ParseAWSJWT ¶ added in v2024.5.3
func ParseAWSJWT( sessionPtr *AWSSession, tokenType, token string, ) ( claims jwt.Claims, tokenValuePtr *jwt.Token, errorInfo pi.ErrorInfo, )
ParseAWSJWT - will return the claims, if any, or an err if the AWS JWT is invalid. This will parse ID and Access tokens. Refresh token are not support and nothing is returned.
Customer Messages: None Errors: None Verifications: None
func PullCognitoUserInfo ¶ added in v2024.12.1
func PullCognitoUserInfo( sessionPtr *AWSSession, username string, ) ( userData map[string]interface{}, errorInfo pi.ErrorInfo, )
func SetClientId ¶ added in v2024.6.14
func SetClientId( clientId string, sessionPtr *AWSSession, )
SetClientId - sets the client ID of the sessionPtr to the specified value.
Customer Messages: None Errors: None Verifications: None
Types ¶
type AWSSession ¶ added in v2024.5.0
type AWSSession struct {
// contains filtered or unexported fields
}
func NewAWSConfig ¶ added in v2024.5.0
func NewAWSConfig(environment string) ( sessionPtr *AWSSession, errorInfo pi.ErrorInfo, )
NewAWSConfig - reads the SDKs default external configurations, and populates an AWS Config with the values from the external configurations.
Customer Messages: None Errors: ErrEnvironmentInvalid, anything awsConfig.LoadDefaultConfig or getPublicKeySet returns, Verifications: None